Cordova Build failed with exception

R-J

Just faced some errors, after adding https://github.com/cowbell/cordova-plugin-geofence plugin to my project.

Removed plugin, but the error with exception is still raising. :/

> $ cordova -d --stacktrace build android
Generating config.xml from defaults for platform "android"
Calling plugman.prepare for platform "android"
Preparing android project
Processing configuration changes for plugins.
Iterating over installed plugins: [ 'com.phonegap.plugins.facebookconnect',
  'it.mobimentum.phonegapspinnerplugin',
  'org.apache.cordova.camera',
  'org.apache.cordova.device',
  'org.apache.cordova.dialogs',
  'org.apache.cordova.file',
  'org.apache.cordova.file-transfer',
  'org.apache.cordova.geolocation',
  'org.apache.cordova.inappbrowser',
  'org.apache.cordova.network-information',
  'net.trentgardner.cordova.galaxygear',
  'io.github.pwlin.cordova.plugins.pdialog' ]
Writing out cordova_plugins.js...
Wrote out Android application name to "<ProjectName>"
deleted: c:\Users\<Name>\workspace\<ProjectName>\platforms\android
\res\drawable-hdpi\icon.png
deleted: c:\Users\<Name>\workspace\<ProjectName>\platforms\android
\res\drawable-ldpi\icon.png
deleted: c:\Users\<Name>\workspace\<ProjectName>\platforms\android
\res\drawable-mdpi\icon.png
deleted: c:\Users\<Name>\workspace\<ProjectName>\platforms\android
\res\drawable-xhdpi\icon.png
deleted: c:\Users\<Name>\workspace\<ProjectName>\platforms\android
\res\drawable-xxhdpi\icon.png
copying image from c:\Users\<Name>\workspace\<ProjectName>\www\ico
n.png to c:\Users\<Name>\workspace\<ProjectName>\platforms\android
\res\drawable\icon.png
copying image from c:\Users\<Name>\workspace\<ProjectName>\www\res
\icon\android\icon-36-ldpi.png to c:\Users\<Name>\workspace\<ProjectName>\platforms\android\res\drawable-ldpi\icon.png
copying image from c:\Users\<Name>\workspace\<ProjectName>\www\res
\icon\android\icon-48-mdpi.png to c:\Users\<Name>\workspace\<ProjectName>\platforms\android\res\drawable-mdpi\icon.png
copying image from c:\Users\<Name>\workspace\<ProjectName>\www\res
\icon\android\icon-72-hdpi.png to c:\Users\<Name>\workspace\<ProjectName>\platforms\android\res\drawable-hdpi\icon.png
copying image from c:\Users\<Name>\workspace\<ProjectName>\www\res
\icon\android\icon-96-xhdpi.png to c:\Users\<Name>\workspace\<ProjectName>\platforms\android\res\drawable-xhdpi\icon.png
copying image from c:\Users\<Name>\workspace\<ProjectName>\www\res
\icon\android\icon-144-xxhdpi.png to c:\Users\<Name>\workspace\<ProjectName>\platforms\android\res\drawable-xxhdpi\icon.png
Wrote out Android package name to "com.projectname.app"
Running command: c:\Users\<Name>\workspace\<ProjectName>\platforms
\android\cordova\build.bat
ANDROID_HOME=c:\Users\<Name>\android-sdks
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_40
Running: c:\Users\<Name>\workspace\<ProjectName>\platforms\android
\gradlew cdvBuildDebug -b c:\Users\<Name>\workspace\<ProjectName>\
platforms\android\build.gradle -Dorg.gradle.daemon=true

FAILURE: Build failed with an exception.

* Where:
Settings file 'C:\Users\<Name>\workspace\<ProjectName>\platforms\a
ndroid\settings.gradle' line: 4

* What went wrong:
A problem occurred evaluating settings 'android'.
> A path must be specified!

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug
option to get more log output.

BUILD FAILED

Total time: 2.395 secs

c:\Users\<Name>\workspace\<ProjectName>\platforms\android\cordova\
node_modules\q\q.js:126
                    throw e;
                          ^
Error code 1 for command: cmd with args: /s /c "c:\Users\<Name>\workspace\<ProjectName>\platforms\android\gradlew cdvBuildDebug -b c:\Users\<Name>\
workspace\<ProjectName>\platforms\android\build.gradle -Dorg.grad
le.daemon=true"
Command finished with error code 8: c:\Users\<Name>\workspace\<ProjectName>\platforms\android\cordova\build.bat
Error: c:\Users\<Name>\workspace\<ProjectName>\platforms\android\c
ordova\build.bat: Command failed with exit code 8
    at ChildProcess.whenDone (c:\Users\<Name>\AppData\Roaming\npm\node_modules\co
rdova\node_modules\cordova-lib\src\cordova\superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:756:16)
    at Process.ChildProcess._handle.onexit (child_process.js:823:5)

settings.gradle file:

// GENERATED FILE - DO NOT EDIT
include ":"
include ":CordovaLib"
include ":com.phonegap.plugins.facebookconnect::FacebookLib"

Tried few things:

  • ant clean through console
  • Project -> clean through Eclipse
  • android update project through console

Nothing worked for me. :/

Can anyone help me? :)

R-J

Removed plugin associated with line 4 in settings.gradle file, project compiled. Then added again Geofence plugin and it works again! :)

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Cordova Build failed with exception

From Dev

FAILURE Build failed with an exception cordova. when build command run

From Dev

Build failed with an exception

From Dev

Cordova build | Run failed - compileDebugJavaWithJavac

From Dev

FAILURE: Gradle Build failed with an exception

From Dev

FAILURE: Gradle Build failed with an exception

From Dev

Lint - FAILURE: Build failed with an exception

From Dev

TransmogrifAI : FAILURE: Build failed with an exception

From Dev

IONIC | FAILURE: Build failed with an exception

From Dev

Build error Ionic Android : Build failed with an exception

From Dev

Build iOS failed - Cordova Ionic iOS

From Dev

cordova build Command failed with exit code EACCES

From Dev

cordova build Command failed with exit code EACCES

From Dev

Cordova build: Command failed with exit code 8

From Dev

Cordova build : Error :Failed to run "java -version "

From Dev

Robolectric : Build failed with Null Pointer Exception

From Dev

react-native : Build failed with an exception

From Dev

FML Gradle - FAILURE: Build failed with an exception

From Dev

Robolectric : Build failed with Null Pointer Exception

From Dev

FAILURE: Build failed with an exception. Ionic

From Dev

Android Studio Build failed with an exception Execution failed for task ':app:dexDebug'

From Dev

VS 2015 RC Apache Cordova Blank appTemplate Build Failed

From Dev

phonegap cordova xcode link failed when build to 64bit

From Dev

BUILD FAILED after ionic plugin add cordova-plugin-googlemaps

From Dev

Why Jenkins failed with Cordova multi configuration project with build as failure?

From Dev

Getting Build failed with an Exception Android Studio 0.4.3 and 0.4.4

From Dev

Jekyll build failed: Liquid Exception: cannot load such file -- yajl

From Dev

Failure: build failed with an exception a problem occured configuring root project 'android'

From Dev

java:54: error: class, interface, or enum expected and Build failed with an exception

Related Related

  1. 1

    Cordova Build failed with exception

  2. 2

    FAILURE Build failed with an exception cordova. when build command run

  3. 3

    Build failed with an exception

  4. 4

    Cordova build | Run failed - compileDebugJavaWithJavac

  5. 5

    FAILURE: Gradle Build failed with an exception

  6. 6

    FAILURE: Gradle Build failed with an exception

  7. 7

    Lint - FAILURE: Build failed with an exception

  8. 8

    TransmogrifAI : FAILURE: Build failed with an exception

  9. 9

    IONIC | FAILURE: Build failed with an exception

  10. 10

    Build error Ionic Android : Build failed with an exception

  11. 11

    Build iOS failed - Cordova Ionic iOS

  12. 12

    cordova build Command failed with exit code EACCES

  13. 13

    cordova build Command failed with exit code EACCES

  14. 14

    Cordova build: Command failed with exit code 8

  15. 15

    Cordova build : Error :Failed to run "java -version "

  16. 16

    Robolectric : Build failed with Null Pointer Exception

  17. 17

    react-native : Build failed with an exception

  18. 18

    FML Gradle - FAILURE: Build failed with an exception

  19. 19

    Robolectric : Build failed with Null Pointer Exception

  20. 20

    FAILURE: Build failed with an exception. Ionic

  21. 21

    Android Studio Build failed with an exception Execution failed for task ':app:dexDebug'

  22. 22

    VS 2015 RC Apache Cordova Blank appTemplate Build Failed

  23. 23

    phonegap cordova xcode link failed when build to 64bit

  24. 24

    BUILD FAILED after ionic plugin add cordova-plugin-googlemaps

  25. 25

    Why Jenkins failed with Cordova multi configuration project with build as failure?

  26. 26

    Getting Build failed with an Exception Android Studio 0.4.3 and 0.4.4

  27. 27

    Jekyll build failed: Liquid Exception: cannot load such file -- yajl

  28. 28

    Failure: build failed with an exception a problem occured configuring root project 'android'

  29. 29

    java:54: error: class, interface, or enum expected and Build failed with an exception

HotTag

Archive