After the game is packaged in iOS, pack the APK;
Currently using the-X 3.0 if you need to modify build_native.py such as Ndk_root and some error
Modify android.mk Add source file local_src_files: = xxx
Tip: Use ls to command ls all source files, and then use tools like sublime to quickly add
Sublime Artifact
Compile
Libs/armeabi/libcocos2dcpp.so
Using Ant to build apk
xxx-release-unsigned.apk
Script (a few lines, lazy to organize)
#!/usr/bin/pythonImportSYSImportOS, Os.path#--------------Main--------------if __name__=='__main__': Os.chdir ('/users/linxiaojin/dev/git/mywork/game/polymer/cocos2d/cocos/platform/android/java/') Os.system ('/users/linxiaojin/dev/tools/adt-bundle-mac-x86_64-20140702/sdk/tools/android Update Project--path.') Os.system ('/users/linxiaojin/dev/tools/apache-ant-1.9.4/bin/ant Release') Os.chdir ('/users/linxiaojin/dev/git/mywork/game/polymer/proj.android') Os.system ('/users/linxiaojin/dev/tools/adt-bundle-mac-x86_64-20140702/sdk/tools/android Update Project--path.') Os.system ('/users/linxiaojin/dev/tools/apache-ant-1.9.4/bin/ant Release')
Generate release-signed.apk
Edit Ant.properties Join (possibly other wording)
Key.alias=android.keystore
Key.store=android.keystore
key.store.password=lin0-618
key.alias.password=lin0-618
Also execute ant
Get xx-release.apk
Other:
Android.keystore using command line generation
Keytool-genkey-alias android.keystore-keyalg rsa-validity 20000-keystore android.keystore
Cocos2d-x Android Packaging