Cocos2dx:cocos2d-x-3.2版本学习过程中所遇到的一些问题
发布时间:2020-12-14 17:17:07 所属栏目:百科 来源:网络整理
导读:1、类似:BUILD FAILED D:adt-bundle-windows-x86_64-20140702sdktoolsantbuild.xml:601: The following error occurred while executing this lin e: D:adt-bundle-windows-x86_64-20140702sdktoolsantbuild.xml:720: The following error occurr
1、类似:BUILD FAILED
D:adt-bundle-windows-x86_64-20140702sdktoolsantbuild.xml:601: The following error occurred while executing this lin e: D:adt-bundle-windows-x86_64-20140702sdktoolsantbuild.xml:720: The following error occurred while executing this lin D:adt-bundle-windows-x86_64-20140702sdktoolsantbuild.xml:734: Unable to find a javac compiler; com.sun.tools.javac.Main is not on the classpath. Perhaps JAVA_HOME does not point to the JDK. It is currently set to "C:Program FilesJavajre1.8.0_65" 解决办法:将C盘java中的jdk的lib中的tools.jar压缩包复制到jre中的lib中存一份。 2、“extensions/ExtensionMacros.h”找不到和加载cocostudio需要添加的库(基本上都是这三个库) 在解决方案中导入现有项目:cocos2dcocosuiproj.win32libGUI.vcxproj cocos2dextensionsproj.win32libExtensions.vcxproj cocos2dcocoseditor-supportcocostudioproj.win32libCocosStudio.vcxproj 在自己项目属性通用属性引用-》添加新引用(将前面导入的项目勾上确定); 在自己项目属性配置属性C/C++常规-》附加包含目录中添加: $(EngineRoot) $(EngineRoot)cocos $(EngineRoot)cocoseditor-support (下面这个是在使用cocostudio导出的UI的调用的时候需要的头文件和命名空间) #include "editor-support/cocostudio/CCSGUIReader.h" #include "cocostudio/CocoStudio.h" #include "ui/CocosGUI.h" using namespace cocos2d::ui; using namespace cocostudio; 3、cocos2d-x-3.2版本打包安卓莫名错误: File "D:cocos2d-x-3.2toolscocos2d-consolebin/cocos.py",line 504,in <module> run_plugin(command,argv,plugins) dependencies_objects[dep_name] = run_plugin(dep_name,line 471,85); font-family:'microsoft yahei'; font-size:15px; line-height:35px"> plugin.run(argv,dependencies_objects) File "D:cocos2d-x-3.2toolscocos2d-consolebin..pluginsproject_compileproject_compile.py",line 1075,in run self.build_android() self.apk_path = builder.do_build_apk(sdk_root,ant_root,self._ap,build_mode,output_dir,self._custom_step_args,self) File "D:cocos2d-x-3.2toolscocos2d-consolebin..pluginsproject_compilebuild_android.py",line 307,in do_build_apk self._copy_resources(custom_step_args) shutil.rmtree(assets_dir) File "C:Python27libshutil.py",line 247,in rmtree rmtree(fullname,ignore_errors,onerror) onerror(os.remove,fullname,sys.exc_info()) os.remove(fullname) WindowsError: [Error 5] : 'd:CocosDevelopPopStarproj.androidassetsstars.svnall-wcprops' 解决:将proj.androidassets和proj.androidbin清空后重新编译 -----------------------------------------------------------------------警告----------------------------------------------------- Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml 解决办法:jniApplication.mk中添加 APP_PLATFORM := android-9 (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |