Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0

Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0
0.0 0


How can I solve this problem:

cocos compile -p android
Python 2.7.10
Building mode: debug
Using Eclipse project : /PROJECTS/COCOS/test/
Ant (Eclipse project) is not supported from Android SDK Tools 25.3.0.

My configuration is:

macOS Sierra 10.12.5
java version “1.8.0_131”
android studio 2.3.2

I readed old post that suggest to downgrade android-sdk but I can’t found old SDK for Mac. Can you help me to compile or downgrade SDK.


I uploaded the tools folder: You just need to replace the folder in Android SDK. The link will be invalid in 7days.


Are there plans to solve this issue?
Are there best practices to cocos2d-x android development on MacOSX?


forget ant , start using android-studio and gradle. Ant really not making sense for cocos 3.x :slight_smile: no any advantage over gradle.


Yep, we suggesting to use Android Studio instead.


I’ve tried different sdk versions because of ant. I think cocos needs better documentation. The existing tutorials are outdated and i lost a day before finding this thread.


How to build prebuilt libs with gradle?


Same problem here.

Cocos docs need to be updating.

How to start a new cocos2dx project within Android Studio ?
Like @piotrros asked, how to build prebuilt libs with gradle ?


Does it mean would not be supported since SDK Tools 25.3.0?


Yep, since some tools removed by Android SDK. Of course you can copy tools from older Android SDK version if you really like ant building.


But will it regain support? Recently I updated with new SDKManager embedded in Android-Studio and even with downgrading to Android SDK tools revision 25.2.3 or 25.2.3 I get this error during compilation:

   [dx] java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
   [dx]     at java.lang.ClassLoader.defineClass1(Native Method)
   [dx]     at java.lang.ClassLoader.defineClass(
   [dx]     at
   [dx]     at
   [dx]     at$100(
   [dx]     at$
   [dx]     at$
   [dx]     at Method)
   [dx]     at
   [dx]     at java.lang.ClassLoader.loadClass(
   [dx]     at java.lang.ClassLoader.loadClass(
   [dx]     at sun.misc.Launcher$AppClassLoader.loadClass(
   [dx]     at java.lang.ClassLoader.loadClass(
   [dx]     at sun.launcher.LauncherHelper.checkAndLoadMain(
   [dx] Exception in thread "main"

Even when building with --ap android-20.


@MatrixAndrew i don’t quite understand your issue. Will you please describe your issue in more detail?



Unsupported major.minor version 52.0

I think it is related to installed on machine Java version so you need newest java


Exactly; buildToolsVersion larger than 23.0.3 requires JDK8, I now successfully use the latest (26.0.0). Also, for me NDK r13b is the highest version that seems to work with Ant projects ( Plus, the hack of downgrading to platform tools version r25.2.5 is mandatory as well for successful compilation as of now.


I would recomend to intsall/configure on machine cocos2d-x 3.15 and then with it you should be able to compile your ant project event with latest android sdk, I preferring to use NDK 10 it seems have less crashes nad buildtools 25.0.0 , targetsdk 22, minsdk 15


I think this gives better results:
NDK r13b, latest build tools (26.0.0), min sdk 15, target sdk 25, compile sdk 20 (for highest compatibility, not entirely sure though) and platform tools 25.2.5 (with the downgrade hack).


Are u implementing permissions requests on fly because using target sdk 25?


I overlooked, I use targetSdkVersion 23.


permission requests should be implemented starting from target sdk 23 :slight_smile: anyway


During debugging it isn’t needed, I’m not planning on using dangerous permissions anyways. It shouldn’t be hard to implement on-the-fly permissions though.