This is a migrated thread and some comments may be shown as answers.

Android Build Fails

2 Answers 65 Views
Command-Line Interface
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Joe
Top achievements
Rank 1
Joe asked on 03 Mar 2016, 09:52 AM

Hi, I'm trying to build a Cordova project for Android on Windows and it seems like whatever I try, I keep riunn

android Build Tooling revision 2016.03.01.1r
    Warning: npm
    Warning: ERR!
    Warning: addLocal Could not install /home/builder/BpcTooling/Cordova3/Plugins/org.apache.cordova.battery-status
    Warning: npm
    Warning: ERR! addLocal Could not install /home/builder/BpcTooling/Cordova3/Plugins/org.apache.cordova.battery-status
    Warning: Failed to fetch plugin /home/builder/BpcTooling/Cordova3/Plugins/org.apache.cordova.battery-status via registry.
Probably this is either a connection problem, or plugin spec is incorrect.
Check your connection and plugin name/version/URL.
Error: ENOENT: no such file or directory, open '/home/builder/BpcTooling/Cordova3/Plugins/org.apache.cordova.battery-status'
    Warning: /home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189
                            throw Error("exit code: " + code);
                            ^
 
Error: exit code: 1
    at Error (native)
    at ChildProcess.<anonymous> (/home/builder/BpcTooling/Cordova3/node_modules/cordova-build-utils/bin/install-plugins-3.js:189:14)
    at emitTwo (events.js:87:13)
    at ChildProcess.emit (events.js:172:7)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)
    Error: Build failed during execution
    Error: 'Build failed with error code 1'

I've tried running as admin, and all that kind of thing. Does anyone have any idea what could be causing the plugin install to fail?

2 Answers, 1 is accepted

Sort by
0
Joe
Top achievements
Rank 1
answered on 03 Mar 2016, 10:07 AM
Never mind, I recreated the project and the problem mysteriously vanished - the only difference between the two was that I had set the FrameworkVersion to 4.0.0 in the first version. Could that have been the issue?
0
Joe
Top achievements
Rank 1
answered on 03 Mar 2016, 10:59 AM
Ah, after reading the docs I found out you have to set the framework version through appbuilder mobileframework set <Version>, not just by changing the value in the project file. My bad! Will leave this here in case anyone else runs into the same issue.
Tags
Command-Line Interface
Asked by
Joe
Top achievements
Rank 1
Answers by
Joe
Top achievements
Rank 1
Share this question
or