docs/android_studio.md
openFrameworks | Documentation table of contents
The Android distribution of openFrameworks is setup to work with Android Studio IDE.
Setting up openFrameworks with Android Studio is fairly straightforward. The basic steps are:
scripts/android/download_libs.sh to download libraries.examples/android folder.local.properties or click Project Structure and select the NDK location.Press the Play button next to the androidEmptyExample shown in the toolbar. It will build the app and deploy it to your Android device after a few seconds (or prompt you to deploy it to a suitable emulator). If the app runs, congratulations! You have setup openFrameworks.
AndroidManifest.xml file.You may need to adjust the following numbers to match your installed Android Studio and Android SDK. Android Studio should offer to fix these values for you when you open the appropriate build files.
/build.gradlecompileSdkVersion, buildToolsVersion, minSdkVersion, targetSdkVersion values
in /addons/ofxAndroid/ofAndroidLib/build.gradle and /apps/myApps/androidEmptyExample/build.gradleIf you get strange linker errors, make sure you are using NDK version r15c. Newer NDKs might work but usually require some changes.
If your connected device is not recognized by Android Studio, restart adb
with adb kill-server && adb start-server.
If, when synchronizing a project for the first time, clicking on the console messages does not solve the problem regarding a missing dependency of the android API (like for example Android API 22), open the sdk from the console, select the missing API and install it.