Download cocos2d from github. Https://github.com/ZhouWeikuan/cocos2d:
After entering the above URL, if you do not use git or svn, click "Download ZIP" in the lower right corner of the page.
After the download is decompressed, there is a "cocos2d-android" directory, because I am Android development, so will use this directory.
Next, we will include this folder in Eclipse.
There are two errors during running:
1. The first error is that this project is a Library project. You can simply cancel its Libray attribute in the attribute.
The second error will occur during subsequent running.
After reading for a long time, I finally found that this folder already contains a jar file, and the source code in src is repeated, just need to delete/libs/cocos2d-android.jar file to run it.
Ah, there are a lot of demos available for running, so interesting ~