I just got done creating a game for iOS using cocos2D and am now trying to learn android development and cocos2D using eclipse. I've imported the cocos2D .jar file into the android project, but this has no nice documentation like it does programming in XCode. Could anyone provide me with a simple walkthrough on how to import the cocos2D source code into my android project so that I can view the javadoc while I write code?
I found this on a forum
---Try downloading the source files for Cocos2D and directly adding them to your project (copy the ‘org’ folder into your ‘src’ folder, then press F5 while the src folder is selected in the project explorer), making sure to remove the reference to the jar file. This should resolve any missing functionality, while giving you extra help when typing in Cocos2D code (Eclipse will automatically display the javadoc comments for you).---
I assume this is the source code: https://github.com/ZhouWeikuan/cocos2d/tree/master/cocos2d-android
but I don't see any org folder, and would greatly appreciate a better walkthrough in general.
Could anybody help? I would really like to have the javadoc to help me through the learning curve.
P.S.
I'm new to the forum, and maybe this should be a new question of itself, but the .jar file I'm currently using I downloaded from http://code.google.com/p/cocos2d-android-1/downloads/detail?name=cocos2d-android.jar&can=2&q=
but I seem to be missing some implementation such as CGRectIntersectsRect and CCTMXTiledMap. Is this an outdated .jar that not up to date and something that would be fixed using the source code? I have seen examples of both used for android so I know they are implemented in some revision of cocos2d for android.
Any help or advice would be greatly appreciated.
the org folder you are talking about is included in here
https://github.com/ZhouWeikuan/cocos2d/tree/master/cocos2d-android/src
download the whole project then just copy the org folder to your src folder in eclipse
this is a nice tutorial for starting http://dan.clarke.name/2011/04/how-to-make-a-simple-android-game-with-cocos2d/
it's a good thing to do so you can figure out the small differences between the cocos2d-iphone and cocos2d-android , just following the first tutorial should do it for you
Related
I've made a game with Aide and I'm trying to incorporate Admob, but I'm running into trouble.
I'm using Aide to make it, and it's gradle support is only partly there. There is no build.gradle for libgdx projects in Aide, so I can't add the libraries I need that way. You can add the play services to a normal android app in Aide, and I can initialize mobileads in a blank app no problem.
I tried to copy the com.google.android.gms.ads folder into my game libs, it will import com.google.android.gms.ads - but there's only .R and .manifest that it will import. From what I can tell, there should be a mobileads.class file in the folder, but it's not. A blank app can find it, but I can't with a file explorer, or with my libgdx game.
Is there a workaround for this? I can't be the only person who has ever made a game in Aide and tried to add ads to it... can someone link me to a download of the class files I need? Or a libgdx gradle file for Aide?
If anyone has any ideas, it'd be greatly appreciated.
Can anyone tell me the correct step by step way to include Spen-SDK into Android studio? The way I am including it allows the Samsung classes to be accessed from within the app but is leading to some weird problems(I have mentioned the problems here) which no one else seems to face.
Mentioning the steps here or directing me to the site which contains it would suffice. Thanks.
just copy the two .jar files from spen-sdk.zip folder and paste into the libs folder of your project.
An easier way to is to use the SDK Manager and add it there so your project can find it:
http://developer.samsung.com/technical-doc/view.do?v=T000000182L
I am using android studio to import this project called https://github.com/Pixate/pixate-freestyle-android. However when I import it into android studio the folder under samples, freestyleshowcase doesnt seem to build. The other 2 samples buld correctly. There is a red circle around the java file with a J (error) but there is no error in the file itself. COuld someone please help me out?
You are obviously missing some libraries but it is going to be hard for anyone to tell you which since we do not know the libraries the project needs.You can try Build-->Rebuild Project or Build-->Clean Peoject if it still doesn't work, close and open Android Studio.
If that doesn't work also then you have to go the hard way of identifying the libraries need by the project samples you imported and see if you have them.
When in doubt, you can try the Library Dependency option (using Maven) as demonstrated here:
https://www.youtube.com/watch?v=6BUcx9gGQ3o
That way, you won't have to manually edit the build.gradle file.
I have a problem while running the examples from andengine. The error I'm getting is at this line:
System.loadLibrary( "andenginephysicsbox2dextension" );
Couldn't load andenginephysics2dextension. Find library returned null. I noticed other people kept having this problem but no solution was proposed.
Any help is welcomed! Thanks.
looks like you missed to copy the native libraries. AndEngine is now hosted on github and it is in perfectly active development! ( https://github.com/nicolasgramlich/AndEngine ) more info on what changed in the new GLES2 version here: http://www.andengine.org/forums/announces/andengine-gles2-pre-release-on-december-23rd-t6097.html#p26851
Using AndEngine as a library project is recommended and this will automatically 'copy' the native libraries to your project.
Best Regards,
Nicolas
The error you are getting is because you have to build the Box2D extension yourself. I think there is tutorial how to do it. However i stoped there and downloaded the demos from market. Then eventually switched to libGDX.
Check out this tutorial: http://www.youtube.com/playlist?list=PL6131C7A9DDCF959A
The new way of using andEngine is to include the git repos as libraries (without making any jars)
I am using InteliJ Idea Community edition to develop android apps. I was trying to write UnitTests for a HelloWorld App as described in link text
. However I keep on getting an error
Found main project package: com.example.helloandroid
Found main project activity: .HelloAndroid
Error: Unable to load the main project's default.properties
On going through the files that were created by InteliJ Idea, I saw that all the files as mentioned in d.android.com/guide/developing/other-ide.html#CreatingAProject are being created except for defaul.properties and build.properties.
Is there any way we can create these files?
I had the same problem you're describing as I'm also developing using IntelliJ and these are the steps I followed to create a valid default.properties
1) Create a project using Android (with no IDE) the instructions are here. I created using exactly the same information than in my original IntelliJ project but looking at the resulting file it was not that important.
2) Copy the default.properties to your own project
In order to create the project you will have to know the id of the target you are using, you can obtain the list by executing android list targets.
Once I created the project I opened the default.properties file and the only thing important there was the target, in my case Project target.target=android-8
Hope this helps although your question is stackoverflow since a long time already.
Regards
PS: if I knew how to attach a file you wouldn't require to follow the above steps as the resulting file has no project specific information except for the target (if you want me to send it to you just tell me)
This is a bug and has been fixed but the fix has not been released yet:
http://youtrack.jetbrains.net/issue/IDEA-69343?projectKey=IDEA&query=android+default.properties