And you should understand the differences between targetSDK and minSDK. My minSDK is 19 (Android 4.4), so I’m sure the C++ code can’t use newer features. My targetSDK is 27 (Android 8.1), so I’m sure, the Java code is checked against it by lint while compile time.
I don’t know the used cmd of your build, because I just call in my proj.android folder the cmd ./gradlew build (on macOS).
And watching at the 3.17 sources (which is also in your proj.android folder) you can answer your question on your own.
It’s really hard for me to help you without any further information about your current setup. So I can only answer globally.
PS: Did you read and understand the links? Without minimal knowledge of Android builds, you can just copy’n’paste. This will lead to problems in the future, because as I mentioned above: at the end of 2018 you have to follow a new guideline for app updates.
No, you don’t need all of them. The target is enough.
Okay, what does the logcat tell you on the Galaxy S4. If you have minSdk = 15, so your Java/Kotlin code must not call any Android API-calls above 15 without an API-if-clause (e.g):
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) { ... }
If the crash is within the C++ code, you have a bigger problem. Just kidding. Sometime Samsung phones does have shitty Android. I know for sure that e.g. Samsung has a really bad Bluetooth implementation.
PS: Did you test it within an emulator with Android 5? Is there the same error? - The emulator is often x86, so you need to add this to your ABI, because cocos default is only armeabi-v7a.
If his minSdkVersion == 15, the android-19 for the ndk build can break devices with Android API 15 to 18. The minSdkVersion has always to be the same (or higher) as the APP_PLATFORM in the Application.mk file.
No dont change anything, just add that line in Application.mk
If you make changes in any .mk files then you should delete obj folder, so it will compile again.
But this is what is working for me, many post in stackoverflow will tell you the same.
If minSdkversion is less than 19 than we have to add this in Application.mk file.
I tested this in many devices, it will work for sure and made many games with such config no problem so far.
I wouldn’t bet on that. But if you see on the documentation you will see, that between 15 and 19 aren’t new header files, but the you can’t see the underlaying static libraries and this way it could break your game.
To be sure, that it’s working, I won’t differ both settings.
PS: I wouldn’t trust SO, because often the accepted answer isn’t the right one. It’s just a hint in my opinion, but you shouldn’t fully trust it.