Iphone/Android hybrid project question

Iphone/Android hybrid project question
0.0 0


Over the last several days I have been working through the tutorials and such on how to make hybrid projects with cocos2dx. I’m not an experienced programmer- I basically only know what I learned of c++ back in high school. I’m also quite new to using a mac. It’s been a little frustrating but I have learned a lot.

So right now I am having trouble visualizing how the android and iphone projects in a hybrid project work together.

My basic understanding of the process is this:

Modify Source Code (xcode)(in .cpp and .h files) > Compile> App

Compiling and running in xcode was pretty easy, considering I spent some time earlier this year learning some Cocos2D-iphone through a book. However when it comes to the Android part I find myself confused. There’s SDKs, NDKs, Eclipse, and using a terminal a lot. I don’t really mind this, but it makes it hard for me to understand how it all works together.

In Android how does it work? I find everything about the Android part to be confusing. Is Eclipse the equivalent to xcode for Android? How does coding in Eclipse differ than xcode? Do you do any compiling or anything in Eclipse, or is it done in the terminal with the NDK? Are you supposed to use Eclipse much?

Furthermore, what kind of interaction is there in a hybrid project? I would guess you would compile for each device seperately, but do they pull from the same source code? Are there bits of code they don’t share?

If there’s any way you can help me visualize how it all works together that would be a big help, especially on the Android side.