Why u want to compile against latest android? What kind of error u have - I know that there was issue with cocos in previous build when app crashed on all 4.0.x devices - maybe it could be related.
xmm, everyone trying to push latest features in their platform, but in reality better to stick with tested stuff. Like target sdk version 22, even #23 causing issue due permissions request. I really don’t see advantages of using latest - only more possible hidden issues.
something like that. I’m now using gradle(android-studio) and only setting it in gradle/manifest scripts, not passing as console parameter. You should add also in manifest if using eclipse target sdk version.
my advice start using android studio for android part.
Hi guys, building with high level API can not make sure run on low API devices. And especially is that, Android NDK break compatibility since API 21.
In previous, cocos command will select an API level equal or higher than specified API level, and now(after v3.13), it changed the strategy, it will find the specific API level and will stop if not found.
I will try later with same setup - but it really mess now - which NDK and Android SDK version to use for building project - would be good to have some kind table with cocos/NDK/Android SDK best version.
From my experience when Cocos2d-x stating that u should use NDK 11+ and then after using NDK 12 app starting randomly crash or not compiling it really confusing. In my understanding/expierence cocos engine newer works with latest NDK and Android SDK - so I’m confused which setup to choose…
Agree. For each cocos2dx version we should use fixed sdk/ndk version.
I think that it should be checked and forced in cocos console.
Right now everyone has different configuration and problems…
It depends on which Android OS version do you want to run on. Android OS version and API level mapping can refer to this doc.
Default API level lies in APP_ROOT/proj.android/project.properties. But in pervious, cocos console will find the API level >= specified API level defined in project.properties. For example, the content of project.properties is
target=android-13
Cocos console will find 13 first, if not found then will found 14, and 15 until it found a API level that >= 13. We design like this is because developers may not have API 13, so it will be convenient to find a API that >= 13. And it works great until API 21, because API 21 break compatibility.
So changed the logic a few days ago in this patch, it will be included in v3.14. Cocos console will stop if it doesn’t find the specified API level.
I am not sure if i describe it clearly. And i am not sure if there is better way to fix it. Please let me know if you have any idea.
SDK 19 is Android 4.4, you can refer to this doc about API level and Android OS mapping. So it can not make sure that building with Android 4.4 dan run on Android 4.1.0. If you want to run on Android 4.1.0+, you should use API 16.