- Install Android Studio
- Open tools->Android->SDK Manager
- From SDK Platforms, select Android 4.0(IceCreamSandwich) and Android 7.1.1(Nougat)
- From SDK Tools, select NDK, CMake, LLDB and install
- Download Swig: http://www.swig.org (Mac
brew install swig
)
cd source/android/adaptivecards/src
<swig directory>\swig.exe -c++ -java -package io.adaptivecards.objectmodel -outdir main\java\io\adaptivecards\objectmodel -o main\cpp\objectmodel_wrap.cpp AdaptiveCardObjectModel.i
swig -c++ -java -package io.adaptivecards.objectmodel -outdir main/java/io/adaptivecards/objectmodel -o main/cpp/objectmodel_wrap.cpp AdaptiveCardObjectModel.i
- From Android Studio, New->"Import Project..."
- Select folder "\AdaptiveCards\source\android"
- Build->"Rebuild Project"
If you get a build failure similar to "UnsupportedClassVersionError 52.0" then from Android Studio go to: File -> Other Settings --> Default project structure... --> Check Use Embedded JDK
- Follow "To compile" section
- Build->"Build APK" or "Generate Signed APK..."
- add the following to the build.gradle of a project that will use the library compile 'io.adaptivecards:adaptivecards-android:1.2.0' For more information, please go to http://search.maven.org/ and search adaptivecards-android
- Follow steps 1 and 2 from To compile section
- Select "mobile" or "mobilechatapp" project
- Click "Run" button and select device (physical or virtual) 3.1 If running the mobile app, you must copy the samples to the device