Keith Franklin jathanna created CB-14008:
--------------------------------------------
Summary: Cordova Build fails for android in Ubuntu machine
Key: CB-14008
URL: https://issues.apache.org/jira/browse/CB-14008
Project: Apache Cordova
Issue Type: Bug
Components: cordova-android
Affects Versions: cordova-android-7.0.0
Environment: * Os: Ubuntu 16.04 LTS
* node.js : 8.9.4
* npm: 5.8.0
* cordova: 8.0.0
* android: 7.0.0
Reporter: Keith Franklin jathanna
Assignee: Joe Bowser
Fix For: 8.0.0
h6. I run the command ``cordova build `` and I get the error:
```
Android Studio project detected
ANDROID_HOME=/home/keith/Android/Sdk
JAVA_HOME=/usr/lib/jvm/java-8-openjdk-amd64/
studio
Starting a Gradle Daemon, 1 incompatible Daemon could not be reused, use
--status for details
:wrapper
BUILD SUCCESSFUL
Total time: 3.704 secs
Subproject Path: CordovaLib
Subproject Path: app
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
> Could not find android-maven-gradle-plugin.jar
> (com.github.dcendents:android-maven-gradle-plugin:1.5).
Searched in the following locations:
[https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.jar]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
* Get more help at [https://help.gradle.org|https://help.gradle.org/]
BUILD FAILED in 0s
(node:11046) UnhandledPromiseRejectionWarning: Unhandled promise rejection
(rejection id: 1): Error:
/home/keith/Documents/personal/financeTracker/mobileApp/platforms/android/gradlew:
Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':CordovaLib'.
> Could not resolve all files for configuration ':CordovaLib:classpath'.
> Could not find android-maven-gradle-plugin.jar
> (com.github.dcendents:android-maven-gradle-plugin:1.5).
Searched in the following locations:
[https://jcenter.bintray.com/com/github/dcendents/android-maven-gradle-plugin/1.5/android-maven-gradle-plugin-1.5.jar]
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or
--debug option to get more log output.
* Get more help at [https://help.gradle.org|https://help.gradle.org/]
BUILD FAILED in 0s
(node:11046) [DEP0018] DeprecationWarning: Unhandled promise rejections are
deprecated. In the future, promise rejections that are not handled will
terminate the Node.js process with a non-zero exit code.
```
h5. I make the change in the ``platforms/android/CordovaLib/build.gradle``
```
buildscript {
repositories {
jcenter()
maven {
// change "https://maven.google.com"
url "https://plugins.gradle.org/m2/"
}
}
dependencies {
// classpath 'com.android.tools.build:gradle:3.0.1'
// change 1.5 to 2.0
classpath 'com.github.dcendents:android-maven-gradle-plugin:2.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
}
}
```
and the build works.
```
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]