segunda-feira, 6 de março de 2017

Ionic Android - "Could not resolve all dependencies for configuration" e "Could not find any version that matches com.android.support:support"

Olá :)

Rodei o comando "ionic build android" e tive o seguinte erro:

Running command: C:\work\Dropbox\othertools\node\node.exe C:\work\Dropbox\workspaces\ws-ionic\my-app\hooks\after_prepare\010_add_platform_class.js C:\work\Dropbox\workspaces\ws-ionic\my-app
add to body class: platform-android
Running command: C:\work\Dropbox\othertools\node\node.exe C:\work\Dropbox\workspaces\ws-ionic\my-app\hooks\after_prepare\020_remove_sass_from_platforms.js C:\work\Dropbox\workspaces\ws-ionic\my-app
ANDROID_HOME=C:\work\Dropbox\android\sdk
JAVA_HOME=C:\work\Dropbox\java\windows\jdk1.8.0_60

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> Could not resolve all dependencies for configuration ':_debugCompile'.
   > Could not find any version that matches com.android.support:support-v4:24.1.1+.
     Searched in the following locations:
         https://repo1.maven.org/maven2/com/android/support/support-v4/maven-metadata.xml
         https://repo1.maven.org/maven2/com/android/support/support-v4/
         file:/C:/work/Dropbox/android/sdk/extras/android/m2repository/com/android/support/support-v4/maven-metadata.xml
         file:/C:/work/Dropbox/android/sdk/extras/google/m2repository/com/android/support/support-v4/maven-metadata.xml
         file:/C:/work/Dropbox/android/sdk/extras/google/m2repository/com/android/support/support-v4/
     Required by:
         :android:unspecified

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

BUILD FAILED

Total time: 23.703 secs
ERROR building one of the platforms: Error code 1 for command: cmd with args: /s,/c,"C:\work\Dropbox\workspaces\ws-ionic\my-app\platforms\android\gradlew cdvBuildDebug -b C:\work\Dropbox\workspaces\ws-ionic\my-app\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"
You may not have the required environment or OS to build this project
Error: Error code 1 for command: cmd with args: /s,/c,"C:\work\Dropbox\workspaces\ws-ionic\my-app\platforms\android\gradlew cdvBuildDebug -b C:\work\Dropbox\workspaces\ws-ionic\my-app\platforms\android\build.gradle -Dorg.gradle.daemon=true -Pandroid.useDeprecatedNdk=true"

Pra resolver:
- Abra o Android Studio
- Acesse: Tools > Android > SDK Manager
- Clique na aba SDK Tools
- Selecione "Android Support Repository"
- Dê um "Apply"
- Vá seguindo a instalação

Fonte: https://github.com/driftyco/ionic-cloud-issues/issues/107

É isso aí, abraço!
Adriano Schmidt

Nenhum comentário:

Postar um comentário