Notes for porting cocos2dx games from iOS to Android:

- create-android-project.sh

- eclipse > new project from existing code

- add NDK_ROOT variable in eclipse (build_native.sh need to define NDK_ROOT, otherwise will report "Please define NDK_ROOT")
NDK_ROOT "path.to/android-ndk-r8b"

- make eclipse able to compile c++
New > Others > Convert to c/c++ project

- setup build path
bash path.to/build_native.sh NDK_DEBUG=1 V=1

- add include path: C++ General > Path and symbols
$(COCOS2DX_HOME)/cocos2dx
$(COCOS2DX_HOME)/cocos2dx/include
$(NDKROOT)/platforms/android-9/arch-arm/usr/include
$(workspace_loc)/Classes

- add c++ classes
link from source

- Build all (this will build the c++ library)


- Run As (this will pack the apk using jni)



Note:
- create AVD > enable GPU emulation for OpenGL ES2.0 support (start from Android 4.03)
- upon test I'm still not able to run OpenGL ES2.0 in emulator, but deploy to real device will work

更多相关文章

  1. 代码中设置drawableleft
  2. android 3.0 隐藏 系统标题栏
  3. Android开发中activity切换动画的实现
  4. Android(安卓)学习 笔记_05. 文件下载
  5. Android中直播视频技术探究之—摄像头Camera视频源数据采集解析
  6. 技术博客汇总
  7. android 2.3 wifi (一)
  8. AndRoid Notification的清空和修改
  9. Android中的Chronometer

随机推荐

  1. android 退出系统
  2. Android(安卓)Asynchronous Http Client
  3. Android(安卓)WebView untold stories
  4. Android(安卓)8.0 通知栏的适配
  5. 自定义的水平进度条 layer-list
  6. xml中自定义图形
  7. contentProvider不是线程安全的
  8. Android(安卓)JazzyViewPager
  9. Android(安卓)线性布局 LinearLayout
  10. android中LinearLayout,FrameLayout的对比