Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
cordova-android-7.0.0
-
None
-
- Os: Ubuntu 16.04 LTS
- node.js : 8.9.4
- npm: 5.8.0
- cordova: 8.0.0
- android: 7.0.0
Description
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
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
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.
```
I make the change in the ``platforms/android/CordovaLib/build.gradle``
```
buildscript {
repositories {
jcenter()
maven
}
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.
```
Attachments
Issue Links
- links to