最新动态
cocos2dx3.2 android平台搭建开发环境纠错备忘录
2024-12-27 03:04

平台:win32 + android

cocos2d版本:3.2




      Android platform not specified, searching a default one...Can't find right android-platform for project :"F:cocos2d-x-3.1.1 estscpp-testsproj.android".The android-platform should be equal/larger than 20

解决方案

      如果你遇到这个问题,那么就要在



      下创建一个空的android-20文件夹,这个问题坑了我很久!同时要查看命令是否是 –ap 20(双-)。同时检查proj.android目录下的project.properties是否是android-20





      cocos run -p android 报错:文件名、目录名卷标语法不正确,如图:             

解决方案


      1)修改cocos2dx文件夹下
            .. oolscocos2d-consolepluginsproject_compile中的build_android.py


                  command = "%s clean -f %s -Dsdk.dir=%s" % (self._convert_path_to_cmd(ant_path), buildfile_path, self._convert_path_to_cmd(sdk_root))
      改成


                  command = "%s clean %s -f %s" % (self._convert_path_to_cmd(ant_path), build_mode, buildfile_path)


      2)然后用cmd,移动到项目文件夹下,运行 cocos run -p android



cocos2dx3.2 android平台搭建开发环境纠错备忘录


      编译时,提示找不到gcc对象链 (Couldn""t find the gcc toolchain


解决方案

      这个题目也烦了我好久!去搜检下ndk的设备路径!NDK_ROOT是否正确!然后3.1版本须要的NDK是最新的版本,去安卓网站http://developer.android.com/tools/sdk/ndk/index.html#Installing下一个最新的版本r9d吧




      The directory "android-19" can't be found in android SDK


解决方案

    以上就是本篇文章【cocos2dx3.2 android平台搭建开发环境纠错备忘录】的全部内容了,欢迎阅览 ! 文章地址:https://sicmodule.kub2b.com/quote/14047.html 
     栏目首页      相关文章      动态      同类文章      热门文章      网站地图      返回首页 企库往资讯移动站https://sicmodule.kub2b.com/mobile/,查看更多   
发表评论
0评