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

Android Build failed after adding Crosswalk to Ionic

对 Ionic 添加 Crosswalk 感到兴奋,但现在我的项目无法构建。该项目在更新和添加 Crosswalk 之前正在编译和工作。有人对我如何纠正以下错误有任何建议吗?我宁愿不回滚。感谢上帝的版本控制:)

系统信息:

WARNING [Project: :org.apache.cordova.engine.crosswalk:382300-xwalk_core_library] Current NDK support is deprecated. Alternative will be provided in the future.

: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

ERROR: Unable to open PNG file

Error: Failed to run command: C:\Users\AppData\Local\Android\sdk\build-tools.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

Error Code: 42

Output: 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

ERROR: Unable to open PNG file

:mergeDebugResources FAILED

FAILURE: Build failed with an exception.

What went wrong: Execution failed for task ':mergeDebugResources'.

Error: Failed to run command: C:\Users\AppData\Local\Android\sdk\build-tools.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

Error Code: 42

Output: 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

ERROR: Unable to open PNG file

看起来您遇到了与 this question 类似的错误,即在 Windows 上,路径名限制为 260 个字符,因此移动到路径名较短的目录应该可以解决您的问题问题。