Tips: compilation and creating new projects on Android 4.0

Posted on 2013-11-23 17:01  Flex/AS Programmer  阅读(120)  评论(0编辑  收藏  举报

If you have downloaded android 4.0, you should read the article.

$ANDROID_ROOT/tools/android.bat is changed when you download android 4.0, and it is not compatible with previous versions.
So you should do some work.

1. You should use ndk-r7 to build native codes

Because android.bat of android 4.0 doesn't generate default.properties, it generates project.properties.
NDK versions before ndk-r7 don't recognize project.properties.

2. You should modify cocos2dx/Android.mk manually before compilation

Please refer Build project with ndk-r7.

3. You should use create-android-project.bat or create-android-project.sh to generate new android project

Because android.bat of android 4.0 doesn't generate res/drawable-hdpi, res/drawable-ldpi and res/drawable-mdpi.
New version(cocos2d-1.0.1-x-0.10.0) of create-android-project.bat or create-android-project.sh copy these folders from HelloWorld.

OK, good luck for you.

Copyright © 2024 Flex/AS Programmer
Powered by .NET 8.0 on Kubernetes