Download API 7,8,10,17,19 & Google Play services from Android SDK Manger
Expand Eclipse Memory heap
Fix eclipse.ini at the folder where you installed Eclipse.
Excute Terminal, move to the folder below and run publish.sh
MyGame/cocos2d/plugin/tools/publish.sh |
After completing the build, check for Protocol,admob plugin lib has been created.
3. Change Android build setting
After completing the build at the Terminal, run Game developer guide tool(gameDevGuide.sh)
MyGame/cocos2d/plugin/tools/gameDevGuide.sh |
If you can't run because of GNU AWK, download and install gawk-3.1.8-1.dmg. (gawk-3.1.8-1.dmg download)
After excuting Game developer guide tool, enter the path of the project's Android folder. (MyGame/proj.android in this tutorial)
Select the Plugin you want to use.(In this tutorial, we'll choose AdMob)
Copy and replace the contents in the admob_cocos2dx_3_4-master/proj.android folder.
4. Eclipse Setting
Set CDT ndk build environment path like below.
Import Cocos2d-X and Google Play services's Library Projects.
cocos2d-x | cocos2d-x-3.4/cocos/platform/android/java |
Google Play services | android-sdk-macosx/extras/google/google_play_services/libproject/google-play-services_lib |
Import MyGame project.
Set the "Android" and "Java Build Path" settings of MyGame Project.
5. Result