歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux編程 >> Linux編程 >> Cocos2d-x android cant resolved coscos2dx library

Cocos2d-x android cant resolved coscos2dx library

日期:2017/3/1 10:06:14   编辑:Linux編程

Cocos2d-x的配置可以參考:http://www.linuxidc.com/Linux/2012-10/73099.htm

Cocos2d-x Android can't resolved coscos2dx library是在創建cocos2d-x andrid項目的時候出現的bug,stackoverflow的解決方法:

In cocos2d-x 2.0.3 ...Cocos2d-x Lib java files has been considered as a different project only So import that project in the eclipse

Lets make it Simple

  • First Import the project in eclipse from this path - cocos2d-2.0-x-2.0.3/cocos2dx/platform/android/java

You will see libcocos2dx project in eclipse ...Keep this project open always otherwise your projects will give error on the syntax of library

  • Run create-android-project
  • Now Import the project which you have created and just Run (If you know the concept of isLibrary then that's how they are maintaining it now ..)

Also additional information to run build-native.sh from eclipse only , Right Click Project ->C/C++ Build Uncheck Use Default Build COmmand and add following bash ${workspace_loc:/YourProjName}/build_native.sh NDK_DEBUG=1 V=1

Good Luck ..If any question please feel free to ask

就是先把cocos2d-2.0-x-2.0.3/cocos2dx/platform/android/java裡面的項目加載進來,然後就可以了。

之後右擊項目運行,在手機上就可以看到cocos的啟動畫面了。

Copyright © Linux教程網 All Rights Reserved