Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70434

Gradle build fails on Android - could not resolve all files for configuration

$
0
0

@dsmion wrote:

Hello guys,
I’m getting a build error when running the command ionic cordova run android --device. The error tells that a gradle resource could not be loaded, but I am able to get this resource in the browser on the same machine I’m working behind a proxy. I set the proxy in the gradle.properties file in my gradle home directory. Below is the console output.

ANDROID_HOME=C:\Users\dsimon\AppData\Local\Android\Sdk
JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144
studio
Subproject Path: CordovaLib
Subproject Path: app

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.0.0.

     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.0.0.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
               > [PROXY_HOST]
      > Could not resolve com.android.tools.build:gradle:3.0.0.
         > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
            > Could not GET 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
               > [PROXY_HOST]

* 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 1s
(node:25532) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all files for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.0.0.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.0.0.
         > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
            > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
               > [PROXY_HOST]
      > Could not resolve com.android.tools.build:gradle:3.0.0.
         > Could not get resource 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
            > Could not GET 'https://maven.google.com/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
               > [PROXY_HOST]

* 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 1s

[OK] Your app has been deployed.
     Did you know you can live-reload changes from your app with --livereload?

And the output of ionic info:

cli packages: (C:\Users\dsimon\AppData\Roaming\npm\node_modules)

    @ionic/cli-plugin-proxy : 1.5.7
    @ionic/cli-utils        : 1.19.1
    ionic (Ionic CLI)       : 3.19.1

global packages:

    cordova (Cordova CLI) : 8.0.0

local packages:

    @ionic/app-scripts : 3.1.6
    Cordova Platforms  : android 7.0.0
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.4
    npm               : 5.6.0
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME     : C:\Users\dsimon\AppData\Local\Android\Sdk
    HTTP_PROXY       : [PROXY_HOST]:3128
    http_proxy       : [PROXY_HOST]:3128
    HTTPS_PROXY      : [PROXY_HOST]:3128
    https_proxy      : [PROXY_HOST]:3128
    IONIC_HTTP_PROXY : [PROXY_HOST]:3128
    PROXY            : [PROXY_HOST]:3128
    proxy            : [PROXY_HOST]:3128

Misc:

    backend : legacy

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 70434

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>