After I have set up the cocos2d-x development environment for Android in Eclipse on Windows through this tutorial, I thought I have settled everything down and ready for development except I can't copy the sample project into my own workspace .. (Still Can't) ..
But, later I found this tutorial, .. It is for setting up cocos2dx for android in Eclipse on iOS ..
In the next tutorial, the author didn't use Cgywin or MinGW anymore.. He just set up with Android NDK ..
What I'm curious is
There are a lot of differences between 1st tutorial and 2nd tutorial. Is that just because of the 2nd tutorial is only meant for iOS ?
I don't see any CPP file except in here "jni/hellocpp/main.cpp" in the project content "org.cocos2dx.hellocpp.HelloCpp" project. But, the 2nd author mentioned a lot of CPP files in his tutorial. Why ? Because of the cocos2dx version difference ?
When I open main.cpp file, it shows a lot of errors.. Almost all of those are xxx could not be resolved. I have already added ..\cocos2dx\include path and ..\platforms\android-9\arch-arm\usr\include path correctly. Why ?
I literally can't run the sample program.. It said java.io.IOException: An established connection was aborted by the software in your host machine .. and in Logcat don't support gles2.0 .. Why ? Is that because my JVM is Java SE 7 Server Version ? The first author mentioned "JavaSE 7" won't work with cocos2dx. It only work with "JavaSE 6" .. But, I still have other Android application projects which depends on "JavaSE 7" .. How can I run the sample project in "JavaSE 7" ??
Sorry for the 1001 questions .. I'm totally a newbie to cocos2dx and really eager to work something with it .. :-)
Regards,
If you are still looking for answers, here are some:
1) The "cannot resolve" errors are actually false, and based on eclipse's buggy predictions. You should turn off this error reporting (see the second tutorial link you have, it shows you how at the end).
2) I have recently used cocos2d-x 2.x, and (to my surprise) it doesn't support running on the AVD. I bought a cheap old Galaxy S of of eBay, and the app ran fine on that.
3) you don't see the cpp files, cause they are added only in the make file initially. You must do some extra work to make them appear in eclipse. (Again, check the second tutorial).
Related
I'm trying to build Android Nougat source following the instructions provided here. For the source code and tags I'm not sure what to opt for so I opted for,
N2G48H android-7.1.2_r36 Nougat 2017-10-05
make is successful it created image files within out/target directory. When I tried to flash it on emulator by simply typing emulator I'm seeing some weird device like this.
Got doubted on my target device type so tried following the instructions provided in this answer but still I'm seeing the same weird screen. Any help on this would be much appreciated.
I'm trying to build an empty HaxePunk project for Android to test the build chain, and while I'm never getting any error, all my attemps have crashed at run time with the same error message :
Error: dlopen failed: cannot locate symbol "stpcpy" referenced by libzlib.so...
I am running the executable on a pretty old phone with Android 4.3 on it ; a Sony Xperia M.
I have been doing a bit of research, and so far I mostly see the same things being repeated : update your NDK (I've been using the latest one from the android dev website and not the one lime setup android downloads), build for previous API versions (which I am also doing with <config:android target-sdk-version="18" /> in my project.xml file). So I don't know what I'm doing wrong, if anything.
Another thing I found is that I'm using the git version of HXCPP, and when I built the Android libs with neko build.n android in the project subdir, it was using -DHXCPP_ANDROID_PLATFORM=26 whereas the Lime build of my project is using -DHXCPP_ANDROID_PLATFORM=9, so that can't be good. However, I don't really know much about Android at all, but I have read that the SDK version and Android platform are two different things, or so I've read.
Any help with this will be much appreciated.
EDIT : Okay so something weird happened : up until now I was trying to install the APK manually by copying it to my phone's files and launching it from there, which kept crashing. I tried lime test android once without changing anything at all and it worked fine, and from then I could manually install the APK like I used to, and the error never happened again. I can't replicate it, but it's still an open case.
This is my first time learning IBM Worklight, so please bear with me. I was following this tutorial, however i stucked in page 14, where the tutorial tell me to "run as android project" so the project will be run on android simulator.
This is the error i got :
Could not find HelloWorklightHelloWorklightAndroid.apk!
What should i do? I also have watched this video, and everything works fine in that video (no error like mine)
Thanks for your time, any help is appreciated :D
The answer is because a BUG in ADT 22. I need to upgrade the ADT to latest version and install Android Build Tools.
The way to solve this bug (and get things working )is in my another question (which share the same problem, because i use a same android sdk) :
Eclipse Juno/Android broken, the debug is wrong and gen folder not created (R error)
EDIT
After that, you probably will get CLASSNOTFOUNDEXCEPTION because (again) ADT 22, so you need to do (a little) more things in this IBM link
Clean the project and build it again it works.
I want to debug Android emulator source code in order to get deeper understanding of the simulator. It would be great if I can debug with Eclipse.
I have found just a little information about Android emulator source code.
Any help would be appreciated.
See this. This will guide you how to debug in step by step.
To get Different shout-Cuts >> click Ctrl + Shift + L
I don't know what platform you're on, but basically compile it with all debugging symbols, if in linux you can open with gdb or cgdb also providing the source tree and you'll be able to see everything in the context of the source code.
I haven't used eclipse for this purpose but http://wiki.eclipse.org/DSDP/DD/GDB looks promising ...
I'm sure someone can tell you how to do this with windows if you can't figure it out with uncle google.
The header pretty much explains the issue. I'm getting "Unsatisfied link error" on emulator. What could be the cause and what are the possible solutions?
Some time ago, when we started developing the app, it did work fine on emulator, and one day just stopped. It happened on at least two independent machines.
Ideas, anyone?..
Update: created a new emulator - same thing.
Problem solved! it appears, Android QUEMU emulator only supports ARM5 (APP_ABI:=armeabi), and my library was compiled with armeabi-v7a.
Update: the problem no longer exists.
You should check the following :
Using adb shell go in to the sys/lib/ folder and check if your library was copied there
Did you change the package of your class or did some refactoring? If you did and didn't updated the .cpp file this is causing the unsatisfied link error.
You can also try to manually load your library using System.loadLibrary("myLib");
You could also try to create a new emulator, maybe it got messed some how. Happens a lot.