I’m a newbie here, starting to port my Swift/SpriteKit game to C++/cocos2d-x for Android, with a Mac as my development machine, and I’m confused about which JDK version, which SDK API level, and which version of cocos2d-x I should use. Most of the getting-started tutorials are out of date and I expect it will be simpler to use my existing iOS resources if I avoid Cocos Creator and just build/execute using Terminal and/or eclipse (but it’s really the version number questions that I’m most urgently interested in resolving right now). I want a single build that will execute on a wide range of Android devices, up through 6.0 Marshmallow and whatever comes next.
I’m assuming that the newest stable version of cocos2d-x (3.11.1) is the one to use, right?
Now, in terms of which JDK to use, I understand that JDK 8 is not recommended for Android. JDK 7 only supports Android 4.4 KitKat and later, and if possible I’d like to support Android devices earlier than that. But various posts I’ve read suggest that if I use JDK 6 I can’t build for the newest Android devices, 5.0 Lollipop and later, so how do I get the largest compatibility range with a single build? Do people post multiple versions of the same game using different JDKs in order to get larger coverage? Or are the posts I’ve seen incorrect when they state that I can’t use cocos2d-x to build for Android 5.0+ using JDK 6?
The answer to which JDK I use will also impact which Android SDK I build with. One post I read from last August ’15 states that he installs API-13, 21 and 22 and it works for Android 3.2 through 5.1. Is that accomplished with a single build targeting API-13, using JDK 6? If so, why did he need to install API 21 and 22 (in addition to API -13)?