This article is about building cocos-2d in Android Studio
First of all to download cocos2d jar package jar package can be anywhere on the internet, he has several versions, Cocos2d-x,cocos2d-ios and cosos2d-android, I use Cocos2d-android,
Copy the jar package into the Libs of the project, if there is no libs, you need to build one yourself, in the catalog view of the app directory
After adding it, right-Cocos2d-android.jar, select Add Library, and it will be added to the library.
It is important to note that the location of the image stored in the cocos2d is in the asserts directory, do not put it in the raw directory,
The first run will be reported an error, said to find fps_image.png, this picture is cocos2d used to display the number of frames,
Just put the fps_image.png in the asserts directory, and here's the image.
Android Plants vs Zombies (1)--cocos2d Construction