I\'m trying to make an app on Android Studio that use the NDK and OpenGL ES 3.0.When I #include < GLES3/gl3.h >, the IDE has auto completion as I typing, I think it\'s a sign
Android ndk-bundle has openglES3 since api 18, but in arm platform.
I mean, if you are going to compile your project in armV8_64, you must set your min sdk to 21. But if you are going to use armeabi or armeabiV7 the minimum api will be 18.
So change your minSDK dependig on your preferences in the app/build.gradle file.
I suggest you to define the API 21 and define your product flavours to support for all architectures, besides you can make other 3rdparty library linkings, the code should be something like this:
android.productFlavors {
// for detailed abiFilter descriptions, refer to "Supported ABIs" @
// https://developer.android.com/ndk/guides/abis.html#sa
create("arm") {
ndk.abiFilters.add("armeabi")
ndk.ldFlags.add("-L${file(''your_libraries_path'')}".toString())
ndk.ldLibs.addAll(["your_armeabi_library"])
}
create("arm7") {
ndk.abiFilters.add("armeabi-v7a")
ndk.ldFlags.add("-L${file('your_libraries_path')}".toString())
ndk.ldLibs.addAll(["your_armv7_library"])
}
create("arm8") {
ndk.abiFilters.add("arm64-v8a")
ndk.ldFlags.add("-L${file(''your_libraries_path')}".toString())
ndk.ldLibs.addAll(["your_armv8_library"])
}
}
This gradle code is from the gradle 0.8.3 experimental plugin, so if you have not this version, you need to make some changes to fit into your gradle version.
For me I only have to change the minSdkVersion in build.gradle to 19.
do not forget to set
APP_PLATFORM := android-23 (or other depending on uelordi answer)
to application.mk