Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins: Ionic android build failed

I am beginner of ionic mobile development and now I am setting CI for my mobile application using Jenkins (on localhost). I am facing an error that I am unable to resolve for many days. ionic compiles successfully but at the last at the time of android build preparation it fails and gives error I mentioned below.

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'.
               > corphttpsproxyhost.yourdomain: Name or service not known
      > 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'.
               > corphttpsproxyhost.yourdomain

Please let me know where I am committing mistake, or is there any other dependency issue.

Thanks

like image 348
Akshay Paliwal Avatar asked May 21 '18 13:05

Akshay Paliwal


1 Answers

I think you did not add gradle 3.0.0

You can do this by going to “Configure System” (Jenkins 1.x) or to “Global Tool Configuration” (Jenkins 2.x). From the home page navigate to:

Manage Jenkins -> Configure System (Jenkins 1.x)

Manage Jenkins -> Global Tool Configuration (Jenkins 2.x)

Scroll down a little bit and you should encounter a small section for gradle with a single button labeled “Gradle installations…”. Click on that button to expand the configuration panel.

The gradle configuration panel will ask for a few parameters. Here you can set the tool to a static path, or let Jenkins handle the installation for you. We recommend using “Install automatically” for ease of use. Below is an example of an automatic installation of gradle 3.0.0

than you have to select this gradle version from your project configration. in bbuild tab add Invoke Gradle script Invoke Gradle
X Gradle Version 3.0.0

than build it it may help you

like image 194
Gökhan Musapaşaoğlu ヅ Avatar answered Nov 03 '22 14:11

Gökhan Musapaşaoğlu ヅ