1、类似:BUILD FAILED
D:\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:601: The following error occurred while executing this lin
e:
D:\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:720: The following error occurred while executing this lin
e:
D:\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.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 Files\Java\jre1.8.0_65"
解决办法:将C盘java中的jdk的lib中的tools.jar压缩包复制到jre中的lib中存一份。
2、“extensions/ExtensionMacros.h”找不到和加载cocostudio需要添加的库(基本上都是这三个库)
在解决方案中导入现有项目:cocos2d\cocos\ui\proj.win32\libGUI.vcxproj
cocos2d\extensions\proj.win32\libExtensions.vcxproj
cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj
在自己项目属性\通用属性\引用-》添加新引用(将前面导入的项目勾上确定);
在自己项目属性\配置属性\C/C++\常规-》附加包含目录中添加:
$(EngineRoot)
$(EngineRoot)cocos
$(EngineRoot)cocos\editor-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.2\tools\cocos2d-console\bin\/cocos.py", line 504, in <module>
run_plugin(command, argv, plugins)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\/cocos.py", line 469, in run_plugin
dependencies_objects[dep_name] = run_plugin(dep_name, argv, plugins)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\/cocos.py", line 469, in run_plugin
dependencies_objects[dep_name] = run_plugin(dep_name, argv, plugins)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\/cocos.py", line 471, in run_plugin
plugin.run(argv, dependencies_objects)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\..\plugins\project_compile\project_compile.py", line 1075, in run
self.build_android()
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\..\plugins\project_compile\project_compile.py", line 332, in 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.2\tools\cocos2d-console\bin\..\plugins\project_compile\build_android.py", line 307, in do_build_apk
self._copy_resources(custom_step_args)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\..\plugins\project_compile\build_android.py", line 445, in _copy_resources
shutil.rmtree(assets_dir)
File "C:\Python27\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Python27\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Python27\lib\shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\Python27\lib\shutil.py", line 250, in rmtree
os.remove(fullname)
WindowsError: [Error 5] : 'd:\\CocosDevelop\\PopStar\\proj.android\\assets\\stars\\.svn\\all-wcprops'
解决:将proj.android\assets\和proj.android\bin清空后重新编译
-----------------------------------------------------------------------警告-----------------------------------------------------
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
解决办法:jni\Application.mk中添加 APP_PLATFORM := android-9
D:\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:601: The following error occurred while executing this lin
e:
D:\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.xml:720: The following error occurred while executing this lin
e:
D:\adt-bundle-windows-x86_64-20140702\sdk\tools\ant\build.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 Files\Java\jre1.8.0_65"
解决办法:将C盘java中的jdk的lib中的tools.jar压缩包复制到jre中的lib中存一份。
2、“extensions/ExtensionMacros.h”找不到和加载cocostudio需要添加的库(基本上都是这三个库)
在解决方案中导入现有项目:cocos2d\cocos\ui\proj.win32\libGUI.vcxproj
cocos2d\extensions\proj.win32\libExtensions.vcxproj
cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj
在自己项目属性\通用属性\引用-》添加新引用(将前面导入的项目勾上确定);
在自己项目属性\配置属性\C/C++\常规-》附加包含目录中添加:
$(EngineRoot)
$(EngineRoot)cocos
$(EngineRoot)cocos\editor-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.2\tools\cocos2d-console\bin\/cocos.py", line 504, in <module>
run_plugin(command, argv, plugins)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\/cocos.py", line 469, in run_plugin
dependencies_objects[dep_name] = run_plugin(dep_name, argv, plugins)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\/cocos.py", line 469, in run_plugin
dependencies_objects[dep_name] = run_plugin(dep_name, argv, plugins)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\/cocos.py", line 471, in run_plugin
plugin.run(argv, dependencies_objects)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\..\plugins\project_compile\project_compile.py", line 1075, in run
self.build_android()
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\..\plugins\project_compile\project_compile.py", line 332, in 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.2\tools\cocos2d-console\bin\..\plugins\project_compile\build_android.py", line 307, in do_build_apk
self._copy_resources(custom_step_args)
File "D:\cocos2d-x-3.2\tools\cocos2d-console\bin\..\plugins\project_compile\build_android.py", line 445, in _copy_resources
shutil.rmtree(assets_dir)
File "C:\Python27\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Python27\lib\shutil.py", line 247, in rmtree
rmtree(fullname, ignore_errors, onerror)
File "C:\Python27\lib\shutil.py", line 252, in rmtree
onerror(os.remove, fullname, sys.exc_info())
File "C:\Python27\lib\shutil.py", line 250, in rmtree
os.remove(fullname)
WindowsError: [Error 5] : 'd:\\CocosDevelop\\PopStar\\proj.android\\assets\\stars\\.svn\\all-wcprops'
解决:将proj.android\assets\和proj.android\bin清空后重新编译
-----------------------------------------------------------------------警告-----------------------------------------------------
Android NDK: WARNING: APP_PLATFORM android-19 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml
解决办法:jni\Application.mk中添加 APP_PLATFORM := android-9