在将Crosswalk添加到Ionic后,Android构建失败

8
激动地得知Ionic添加了Crosswalk,但现在我的项目无法构建。在更新和添加Crosswalk之前,该项目正在编译和工作。有人有任何关于如何纠正下面错误的建议吗?我不想回滚。感谢版本控制 :)
系统信息: - 操作系统:Windows 8 - Node版本:v0.10.32 - Cordova CLI:4.2.0 - Ionic版本:1.0.0-beta.14 - Ionic CLI版本:1.3.1 - AngularJS v1.3.8
警告 [项目::org.apache.cordova.engine.crosswalk:382300-xwalk_core_library] 当前 NDK 支持已经过时。将来会提供替代方案。 :mergeDebugResourcesC:\Users\platforms\android\build\intermediates\exploded-aar\android.org.apache.cordova.engine.crosswalk\rsgapp382300-xwalk_core_library\unspecified\debug\res\drawable-hdpi-v4\color_picker_advanced_select_handle.png 错误:无法打开PNG文件 错误:执行命令失败: C:\ Users \ AppData \ Local \ Android \ sdk \ build-tools \ 21.0.2 \ aapt.exe s-i C:\ Users \ platforms \ android \ build \ intermediates \ exploded-aar \ android.org.apache.cordova.engine.crosswalk 382300-xwalk_core_library \ unspecified \ debug \ res \ drawable-hdpi-v4 \ color_picker_advanced_select_handle.png -o C:\ Users \ platforms \ android \ build \ intermediates \ res \ debug \ drawable-hdpi-v4 \ color_picker_advanced_select_handle.png 错误代码:42 输出:C:\ Users \ platforms \ android \ build \ intermediates \ exploded-aar \ android.org.apache.cordova.engine.crosswalk382300-xwalk_core_library \ unspecified \ debug \ res \ drawable-hdpi-v4 \ color_pick er_advanced_select_handle.png 错误:无法打开PNG文件 :mergeDebugResources 失败 错误:构建失败。 出了什么问题:任务':mergeDebugResources'的执行失败。 错误:执行命令失败:C:\ Users \ AppData \ Local \ Android \ sdk \ build-tools \ 21.0.2 \ aapt.exe s-i C:\ Users \ platforms \ android \ build \ intermediates \ exploded-aar \ android.org.apache.cordova.engine.crosswalk 382300-xwalk_core_library \ unspecified \ debug \ res \ drawable-hdpi-v4 \ color_picker_advanced_select_handle.png -o C:\ Users \ platforms \ android \ build \ intermediates \ res \ debug \ drawable-hdpi-v4 \ color_picker_advanced_select_handle.png 错误代码:42 输出:C:\ Users \ platforms \ android \ build \ intermediates \ exploded-aar \ android.org.apache.cordova.engine.crosswalk382300-xwalk_core_library \ unspecified \ debug \ res \ drawable-hdpi-v4 \ color_picker_advanced_select_handle.png 错误:无法打开PNG文件

可能是这个问题(https://dev59.com/u4Hba4cB1Zd3GeqPVLxm#24876107)?错误相似,尽管这些路径看起来不像是> 260个字符。如果将路径缩短,是否可以工作? - user1234
你是对的! :) 我把项目文件夹放在了 C:\ 下,项目成功构建。请将您的评论更改为答案,以便我可以标记它为正确。感谢提供链接。 - GamerDev
1个回答

3

看起来你遇到了与这个问题相似的错误,即在Windows上,路径名被限制在260个字符以内,因此将文件移动到一条较短的路径下应该可以解决你的问题。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接