Cordova build android error Execution failed for task ':processDebugResources'

青春壹個敷衍的年華 提交于 2019-12-02 03:19:13

I found the issue. I have node_moudles and bower_components inside the www of Cordova project. After moving my nodejs dependencies from www and and remvoe the bower_components folder and try bower install again it works.

I don't really understand what the cordova build android running behind the scene that cause error when having node_modules inside the www.

FYI I just used npm to manage dependency for my development(karma, grunt, httpserver, ...). It is even better to move it from the www.

Try adding xml namespace for phonegap (xmlns:gap="http://phonegap.com/ns/1.0") to config.xml

For me the problem was caused by the bower_components. I used the "bower link" command to reference a local bower package so I could work on this simultaneously. But when I tried to build to Android, the build failed with the same error message. Using

bower unlink YOUR_PACKAGE_NAME

(or just removing the 'bower_components' directory) and then reinstalling the packages by

bower install

fixed this issue.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!