Finally I went to educate this framework! Here is my steps:
- Set up NDK: http://developer.android.com/tools/sdk/ndk/index.htmlIt is simple. I described it here:
- Download cocos2dx source. As I using ubuntu I prefer console methods:
git clone https://github.com/cocos2d/cocos2d-x.git - Go to the <cocos_root>
type
./create-android-project.sh
If you see the error:
please define NDK_ROOT
You need correct file native.sh or add NDK_ROOT to enviroment
1 variant:
before if [ -z "${NDK_ROOT+aaa}" ];then
place
export NDK_ROOT="<root_ndk>/android-ndk-<version>"
Run
./build_native.sh - After that we have ready project for eclipse. We need to import it via "Existing projects into Eclipse".
After importing project I faced this error:
The import org.cocos2dx.lib cannot be resolved
So why it happend? During importing project I as usually set tip "Copy files into existing workspace" and required libraries were missed. Therefore references were incorrect too. So I import this required library into my project:
In Eclipse: Import->Exisiting project...-> <project location><~/<cocos_root>/cocos2dx/platform/android/java/> - Ok. Finally I found out that cocos 2.1.4 doesnt't work with ndk r9. Unfortunately it was very late. I spend a lot of hours.
Next I download r8 from here: http://www.crystax.net/ru/android/ndk
Комментариев нет:
Отправить комментарий