我已经为Android安装了所有相关的SDK和构建工具,但是gradle构建失败了。
Execution failed for task ':packageArmv7Debug'.
> Failed to add platforms/android/build/intermediates/res/resources-armv7-debug.ap_我已经确保我运行的是最新的phonegap cli (5.2.1)和cordova (5.1.1),并且我的项目使用的是最新的android设置。
我在mac上运行OSX Yosemite。
发布于 2015-08-28 17:52:07
这是由于意外地将节点模块包含在www目录中的bower模块中造成的。
如果你看到一个构建错误,可能是你的项目中有一些不应该存在的东西。
正在运行
<PathToProject>/platforms/android/gradlew cdvBuildDebug -b <PathToProject>/platforms/android/build.gradle -Dorg.gradle.daemon=true --debug将为您提供导致问题的确切文件。输出将类似于:
10:51:14.394 [DEBUG] [org.gradle.api.Project] => assets/www/bower_components/pointing_js/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib/node_modules/pako/test/browser/test.html
10:51:14.395 [DEBUG] [org.gradle.api.Project] => assets/www/bower_components/pointing_js/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib/node_modules/pako/test/browser/test.js
10:51:14.395 [DEBUG] [org.gradle.api.Project] => assets/www/bower_components/pointing_js/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib/node_modules/pako/test/chunks.js
10:51:14.396 [DEBUG] [org.gradle.api.Project] => assets/www/bower_components/pointing_js/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib/node_modules/pako/test/deflate.js
10:51:14.397 [DEBUG] [org.gradle.api.Project] => assets/www/bower_components/pointing_js/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib/node_modules/pako/test/deflate_cover.js
10:51:14.397 [DEBUG] [org.gradle.api.Project] => assets/www/bower_components/pointing_js/node_modules/grunt-contrib-uglify/node_modules/maxmin/node_modules/gzip-size/node_modules/browserify-zlib/node_modules/pako/test/fixtures/gzip-headers
10:51:14.404 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':packageArmv7Debug'
10:51:14.405 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :packageArmv7Debug FAILEDhttps://stackoverflow.com/questions/32257727
复制相似问题