Android studio support should work with new gradle experimental plugin which claims to offer full NDK support
and Android Studio 1.3+ (which includes JetBrains’ CLion, a C++ IDE). However I wasn’t able to configure it to recognize cocos2d-x, I keep getting linker errors while building the project (“no such file or directory spine/BoneData.h” etc). I’ll keep trying and, if succeed, will publish a github repository with sample project.
I was able to get at least basic C++ highlighting and navigation by creating symbolic links to
Classes directories (this of course only works for Linux and Mac):
$ cd proj.android-studio/app/jni
$ ln -s ../../../Classes
$ ln -s ../../../cocos2d
I compile the native code using
cocos command line interface
$ cd proj.android-studio/
$ cocos compile -pandroid --android-studio --no-apk --app-abi x86
and run the app from Android Studio. Not the ideal workflow but at least I can edit all C++ code and java code from a single Android Studio project. One can go even further and configure a pre-build rule in Android Studio to execute the above
cocos command before every build automatically.