Oh yea! You fully understand me. So @slackmoehrle you see? And I think there are a toons of devs that just gave up. For example - I never used Unity and I managed to build apk in it in 15 min, so easy. But for cocos2d-x I already spent 2 days…
Yeah, actually I am serious. I think most Android devs are using the command-line. We do support Eclipse and Android Studio and there are docs for that. I don’t think Android Studio a perfect solution yet. If I recall Google is working hard on debugging c++, etc.
I don’t see. All I see is this doc fails to explicitly state gen-templates and covering how to use emulators.
gen-templates I’ll document better.
Using an emulator I guess one should read the docs that come with these emulators. Android Studio has emulators built in but how to set them up we can’t possibly document. It isn’t Cocos2d-x specific.
That being said I have never gotten an emulator to work, so I use hardware. If I use hardware and go down through the doc you are reading I am fine (with the exception of gen-templates).
Thanks… I’ll look towards unity… will see what is worse. Damn, when I developed games for iOS only using cocos2d-iphone it was so nice so simple. Also when apportable was alive I was able just in magical and simple way port my game to android by just build and run in xcode… But as I see with cocos2d-x it’s so hard and awkward… okay\ Also it’s bad that you don’t understand how kind documentation should be… I think many people now trying using free cocos2d-x and then at starting puzzle stage - just make it work - just go away in searching some better solutions like unity… to bad.
We hear this from time to time for sure. We don’t cover in great detail the things that Apple and Google are already covering. Perhaps we could add more links to our docs to see external resources for help, but these links change and we spend time chasing down where the content moved to.
p.s. I just tried to build iOS project in Xcode, before that I just opened project and don’t tried to build it, because my main target is android. However it’s not compiling -
Undefined symbols for architecture x86_64:
"_OBJC_CLASS_$_CCEAGLView", referenced from:
objc-class-ref in RootViewController.o
iOS libs were created in debug mode.
lol… what I can say more? Ahh…
Everything I did was with problematic, almost any step. You know what all feeling in general about engine now? For sure not to use it…
I use cocos2d-x 3.10 (mod curl), i can say the easiest way to use it:
Install cocos2dx, install cocos studio.
Set everything (NDK, SDK, whatever)
Create a project from cocos studio.
iOS run and general develop use XCode.
If you need android run, compile, use command line.
For APK Signing (and only for that) i use Android Studio.
If you need specific android debug, import project to eclipse (don’t forget to import sources, and libs, like google admob), set Android xml debug=true,
and voila, it works correctly with breakpoints, etc.
I’m using latest, as described in 1st post. Thanks for this thread - Prebuilt libraries setup the definitive guide and game project kickstart for cocos2d-x 3.13.1
I can now build and run for iOS only. So one of the problems was that in cocos2d-libs project option for build active libs only in debug was set to YES, but it should be NO, so in debug all architectures will be build for iOS.
In release mode it’s set to NO and my project runs. Also other problems was there like this:
So many things to fix many hours to struggle with just installation and build.\
Now, I want to find any friendly example or tutorial: how to build, run and publish game to android. With lets say real life examples. Also I need of course to debug project as I’m doing so in Xcode for iOS, ah so amazing platform pleasure to work with. So what android gives instead?
“Now, I want to find any friendly example or tutorial”
On *nix systems is not so easy if you don’t have a little experience with paths, rights, etc.
Because every setup is individual.
But it’s not hard.
For example by me the .bash_profile file looks like this (maybe there is some incorrect setting in, but it works):
# ANDROID DEVELOPMENT
export PATH="/Volumes/Data/Users/XXXUSERXXX/CODE-IPOD/DEV_LIBS/AndroidDev/android-sdk-macosx/tools:$PATH"
export PATH="/Volumes/Data/Users/XXXUSERXXX/CODE-IPOD/DEV_LIBS/AndroidDev/android-sdk-macosx/platform-tools:$PATH"
export PATH="/Volumes/Data/Users/XXXUSERXXX/CODE-IPOD/DEV_LIBS/AndroidDev/apache-ant-1.9.4/bin:$PATH"
export PATH="/Volumes/Data/Users/XXXUSERXXX/CODE-IPOD/DEV_LIBS/AndroidDev/android-ndk-r10e:$PATH"
Thanks, but mine was good too. But setup ignored my path for SDK some reason, I don’t have any clue why. TOday, after 3 days of problems I finally set up all things just to create a simple project and compile it for iOS, not sure about android yet. I just staring to do that. First will see if libs will compile and then project.
upd.: today for some reason can’t compile lib for iOS error 65. I just created project without libs…
Lol nope, I restarted it many times because I already struggle with this 3 days.
So now where I can find a simple tutorial or doc that shows how on macOS build & run android project and see finally actual result, like working scene?
I found that Android Studio IDE is what I need? Any example or doc about that?
I need cocos2d-x only for android. So how I build my game for android in Xcode? I really waned to.
I’m using CocosBuilder(aka SpriteBuilder) and really happy with coding for iOS. So simple, fast and comfortable. So, for android I will export levels in xml and load them in cocos2d-x and build for android, thats what I need.
I searched but a lot of info looks outdated and many people talking about pre-release options for android studio…
Cocos2d-x docs is awkward, this topic actually about that. But where is in them some information and example how to build game for android in Android studio and finally see running scene anywhere?
SonarLearning - there is no such example for android studio to build or something.
But I would need to add specific SDK’s for android,in-apps and game center. I’m looking for some IDE for that. So this should be Eclipse? And I should use another IDE just for signing?
In eclipse i add for example admob.
For signing you don’t need any IDE. I just use it, because i didn’t tried another mode, and it’s works like a charm.
I clicked more info and downloaded suggested - Download Java for OS X 2015-001 and installed it.
After that I try to run Eclipse Installer again but I get:
So Eclipse suggest me to install outdated java. Ah even here again these stupid problems with simple things.
Which should I use? “Eclipse IDE for C/C++ Developers” or “Eclipse for Android Developers” ?
I’m trying to download both currently but ETA is 4hours oh man… speed so slow. My internet is 100MB\s