Follow these steps to use SAM's code generator for Android Studio:
- Download the library archive for armeabi, armeabi-v7a, x86. This is based on SAM 2017.9.5 so is out of date. You can try building an up-to-date library from the makefiles in https://github.com/NREL/ssc/tree/develop/build_android.
- Unzip libssc.zip (from SAM 2017.9.5 SSC 186) in the opened code generation folder.
- Create an Android Studio project with same name as the SAM case name and include C++ support, Minimum SDK API 13, an Empty Activity, C++ 11 standard.
- Copy the "build.gradle" and "CMakeLists.txt" files in the code generation folder to the Android Studio project "app" folder (replace existing files).
- Copy the "assets" folder in the code generation folder to the Android Studio project "app/src/main" folder.
- Copy the "native-lib.cpp" and "sscapi.h" files in the code generation folder to the Android Studio project "app/src/main/cpp" folder (replace existing file).
- Copy the "MainActivity.java" file in the code generation folder to the Android Studio project "app/src/main/java/com/example/" folder (replace existing file).
- Build project and run in emulator (x86) or Android device based (armeabi or armeabi-v7a).
- Send questions or comments to This email address is being protected from spambots. You need JavaScript enabled to view it..