Reputation: 21
I have created a new ionic project following the instructions on ionic's site.
I followed these steps
ionic start myApp tabs
cd myApp
ionic platform add android
When running ionic serve
- the project runs fine on my computer.
When I try to run ionic build android
so that I can deploy to my phone I get the following error:
A problem occurred configuring root project 'android'.
Could not resolve all dependencies for configuration ':classpath'.
Could not resolve com.android.tools.build:gradle:2.1.0.
Required by:
:android:unspecified
Could not resolve com.android.tools.build:gradle:2.1.0.
Could not get resource 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
Could not GET 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
Unrecognized SSL message, plaintext connection?
Could not resolve com.android.tools.build:gradle:2.1.0.
Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom'.
Unrecognized SSL message, plaintext connection?
The first resource I could not GET https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom I see an xml page no 404 error.
The second link https://jcenter.bintray.com/com/android/tools/build/gradle/2.1.0/gradle-2.1.0.pom downloads the .pom file with no issues.
Not sure what to make of the Unrecognized SSL message, plaintext connection?
ionic version: 2.0.0
gradle version: 2.13
cordova version: 6.3.1
Upvotes: 0
Views: 1314
Reputation: 1417
Try to turn off your firewall; helps if it is a network issue and any the URLs are blocked somehow.
Furthermore, I figured that Andriod studio itself have graddle issue. If you are using SDK installed via Andriod studio then first try resolving it. Here are some links that might help you.
Android Studio graddle 2.1.3 issue
and
Ionic build android failed with 403 Http respose from Gradle, JAVA_HOME not valid
And, you seem to have installed ionic 2.0
which uses angular 2.0
. This issue appears if you meant to use ionic 1.0
but have ionic CLI for 2.0.
Try the following
npm install -g ionic @1.x
ionic start myApp tabs
cd myApp
ionic platform add android
ionic build android.
Good luck. Let me know if this doesn't work for you.
Upvotes: 1
Reputation: 21
Although I was on my home network and not on my company's vpn, my company computer uses Cisco Web Security which was blocking the two sites above.
Upvotes: 2