TheWaterProgrammer
TheWaterProgrammer

Reputation: 8239

Gradle error : peer not authenticated while building command line

I have a QtApp that I am building for android using gradle. Note that I am building it command line on OSX using the tool androiddeployqt using the following command.

$androiddeployqt --sign MyKey.keystore gevupc --storepass somePassword --output android --verbose --input android-libMyQtApp.so-deployment-settings.json

After resolving proxy issues with gradle, it gives me the following error now

Unzipping /var/lib/jenkins/gradlesettings/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b/gradle-2.2.1-all.zip to /var/lib/jenkins/gradlesettings/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b
Set executable permissions for: /var/lib/jenkins/gradlesettings/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b/gradle-2.2.1/bin/gradle

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android-build'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:1.1.0.
     Required by:
         :android-build:unspecified
      > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.1.0/gradle-1.1.0.pom'.
     > peer not authenticated

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

BUILD FAILED

Can someone suggest how to get rid of this issue ?

Upvotes: 1

Views: 3145

Answers (2)

TheWaterProgrammer
TheWaterProgrammer

Reputation: 8239

The problem is with the repositories listed in the buildscript block. Using the following block resolves the issue squarely.

apply plugin: 'com.android.application'
apply plugin: 'maven'
buildscript {
    repositories {
        maven  {
            url "http://repo1.maven.org/maven2"
        }
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.1.3'
    }
}

url "http://repo1.maven.org/maven2" is a repository dependency that gradle 2.1.3 is able to resolve.

Upvotes: 1

Amir Ziarati
Amir Ziarati

Reputation: 15087

It notmally happens if there is a problem with your internet connection.

Ensure you configured the proxy properly and check your internet connection. Direct to the address it mentions to see if you can access it through browser .

Upvotes: 0

Related Questions