How can I use Android Studio together with cocos2d-x? Any hints?
Android Studio link: [[http://android-developers.blogspot.de/2013/05/android-studio-ide-built-for-android.html]]
Android Studio can import eclipse projects. Iâve not tried this.
Sergey Shambir wrote:
Android Studio can import eclipse projects. Iâve not tried this.
Is there a âdefaultâ eclipse project file for cocos2d-x which can be used together with Android Studio?
Sergey Shambir wrote:
Android Studio can import eclipse projects. Iâve not tried this.
Is there a âdefaultâ eclipse project file for cocos2d-x which can be used together with Android Studio?
You probably need to wait a little bit.
Android Studio will create projects with the new gradle based build system. However the build system does not support the NDK at the moment.
According to Xavâs talk on the IO it will come in the near future.
Yes, Android studio doesnât support NDK yet. But it doesnât prevent you from using cocos2d-x in it. (You can build cocos2d-x as a library first. Then use it in Android Studio.)
There is one more way, Android Studio supports Maven. And Maven can build native android code. You can write your pom.xml and build right from studio with Maven, so the project is built whenever you press âPlayâ button. Anyway atm Eclipse is the best choice for me since I havenât found out how to debug your native app in Studio while in Eclipse itâs possible with gdb.
This needs to be revived. I am not sure about Android Studioâs adoption rate, but itâs much more suitable for Android development than Eclipse.
Agreed!
@zhangxm because it targets Android development specifically, and has tons of tools Android developers can utilize, eclipse simply lacks.
FYI, all the Android engineers I worked with up till now use Android Studio, and I am taking about some international studios even.
Thanks.
We will do research about it.
Android Studio RC3 released
Hi Guys, any news about supporting Android Studio by cocos2d-x v3.0? Is there any main discussion thread with some working samples for current version of Android Studio?
Here is the blog post i wrote on how to develop in Android Studio http://www.imaginenot.com/android-studio-and-cocos2d-x/
I just imported a new project, called TestGame, an compiled it using â cocos compile -p androidâ. I tried to run it initially but got an NDK not found error so I added ândk.dir=/Applications/Android/android-ndk-r10dâ to local.properties. Now I get this error:
Error:Execution failed for task â:testGame:compileDebugNdkâ.
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process âcommand â/Applications/Android/android-ndk-r10d/ndk-buildââ finished with non-zero exit value 2
Has anyone copied the gradle example that supports NDK? The Google download link is broken.
Chris
I had this same error and solved it. Try adding this to the build.gradle file of your main folder right after âdefaultConfigâ.
sourceSets.main {
jni.srcDirs = []
}
The brilliant X THANKS!
I changed the âHello Worldâ to âHello Androidâ and recompiled the project at the terminal. I re-ran the project in Android Studio and still got âHello Worldâ. I guess Iâm still not clear on how to incorporate the (C++) classes folder into the Studio project.
Chris
Take into account that Android Studio wonât keep track of the folder where you have your original cocos project (like proj.android⌠) and where you execute build_native.sh.
Your project has been imported somewhere else and thatâs what Android Studio is executing. I think you will need to change the C++ classes there and then import the project.
I am sure thereâs a faster/better way to do this and automate the process but I still donât know how
Hello,
regarding the possibility to use an IDE for Android development with cocos2d-x, is there any recent tutorial on how to do it?
Thanks,
Fabrizio