Issue
I have configured ionic android developing environment. I can open my android project in Android studio 2.2.2 and launch the app in an emulator and it all works fine.
But if I go to my terminal and go to my ionic project. And build or emulate android like:
ionic build android
ionic emulate android
I get an error:
Error: /Users/alex_fimm_dev/Desktop/Projects/ionic/myApp2/platforms/android/gradlew: 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 dependencies for configuration ':_debugApk'.
> A problem occurred configuring project ':CordovaLib'.
> Could not resolve all dependencies for configuration ':CordovaLib:classpath'.
> Could not find com.android.tools.build:gradle:2.2.2.
Searched in the following locations:
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.pom
https://repo1.maven.org/maven2/com/android/tools/build/gradle/2.2.2/gradle-2.2.2.jar
Required by:
android:CordovaLib:unspecified
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Again the project runs fine on Android Studio.
Not sure if I am missing some step or something, Started yesterday with ionic.
Here are some of my versions:
Java(TM) SE Runtime Environment (build 1.8.0_112-b16)
Android 7.1.1 API 25
Android SDK Tools 25.2.4
Android Platform-Tools 25.0.3
Cordova 6.4.0
node 7.3.0
npm 4.0.5
os x yosemite 10.10.2
Solution
Remove platforms/android folder
ionic platform rm android
and add Android again:
ionic platform add android
Answered By - skydroid
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.