Android Build Fails

3 posts, 0 answers
  1. Joe
    Joe avatar
    3 posts
    Member since:
    Aug 2014

    Posted 03 Mar Link to this post

    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. Joe
    Joe avatar
    3 posts
    Member since:
    Aug 2014

    Posted 03 Mar in reply to Joe Link to this post

    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?
  3. Joe
    Joe avatar
    3 posts
    Member since:
    Aug 2014

    Posted 03 Mar in reply to Joe Link to this post

    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.
Back to Top