Hi, right now the APP_PLATFORM is chosen based on the compileSdkVersion of the module. I've reported this issue earlier: https://code.google.com/p/android/issues/detail?id=177530 - please star it. For now, if you want to get going with gradle-experimental, maybe you can split your NDK part to a library module and keep it with a lower compileSdkVersion ?
Regards, Xavier. PS: you can look at the code to see the available options: https://android.googlesource.com/platform/tools/base/+/master/build-system/gradle-experimental/src/main/groovy/com/android/build/gradle/managed/NdkOptions.java On Wednesday, August 5, 2015 at 1:22:47 AM UTC+2, Peter Sperl wrote: > > I would like to add Android TV support to my app, which requires API level > 21. When I set the compileSdkVersion to 21, my app no longer works on pre > lollipop devices because of the changes to the C symbols for rand and the > like ( > http://stackoverflow.com/questions/27091001/how-to-use-mkfifo-using-androids-ndk/27093163#27093163). > > Before gradle, I used to be able to set APP_PLATFORM in Application.mk to > an older API level than I would use to compile Java. How can I do this in > build.gradle? Is there some equivalent of APP_PLATFORM that I can put > inside the ndk block? Ideally I would like to build my Java code with API > 21 to pull in Android TV/Leanback support, while compiling native code at > API 19 in order to not break pre-lollipop devices. Thanks! > > PS - Is there some way to see what the available options are in > build.gradle? Autocomplete doesn't seem to work and I haven't found any > documentation, especially for experimental gradle. Thanks. > > -Pete > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
