Which tool versions to use for new project

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)?

v3.11.1 is the one to use.

We have some info here: http://cocos2d-x.org/docs/installation/A/index.html
but I see the JDK piece is not there for v3.8+

Looking here: https://github.com/cocos2d/cocos2d-x/blob/v3/docs/RELEASE_NOTES.md
I don’t see it either.

@zhangxm might be able to help us with this.

I’m just gaining an understanding of how different Android API levels work when building, and I have a new idea about the JDK version affects Android targets. Here’s my current thinking now, and maybe someone can tell me if this is correct. Maybe JDK 6 can’t be used to build an API targeting Android 5.0 (API 21) or later, however, you can use JDK 6 to build an API targeting Android 3.2 (API 13), and this build would still work on phones using all versions of Android that follow, including Android 5.0 and 6.0 phones. Is that how it works?

My JDK version is 1.8.0_92, and i don’t have any problem. Cocos2d-x supports Android 2.3.3+, you don’t have to care about it.