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对html支持接口总结
  2. [置顶] Android中对Log日志文件的分析
  3. ANDROID音频系统散记之一:A2dpAudioInterf
  4. Android播放GIF动画
  5. ANDROID: NDK编程入门笔记
  6. 分享自己在项目中对android文件系统的一
  7. android:gravity="start" Android(安卓)
  8. Android(安卓)中 WebView 使用漏洞相关介
  9. Android应用开发(一):Android平台搭建与开发
  10. android 每周学习笔记及总结(每周更新)