生成错误的Android离子:构建失败,一个异常 [英] Build error Ionic Android : Build failed with an exception
问题描述
我尝试建立的Android应用程序离子和我有这个错误:
I try to build an ionic app for android and I've this error :
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:+.
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/
Required by:
:android:unspecified
Android的支持库和Android的支持库安装。
Android Support Library and Android support Repository are installed.
感谢您的帮助。
编辑:
我尝试更新科尔多瓦和科尔多瓦,CLI,但没有奏效。
I try to update cordova and cordova-cli but it didn't work.
推荐答案
位置 https://repo1.maven.org/maven2/com/android/support/
不存在了( 404
)。因此,Maven配置似乎是这个问题。
The location https://repo1.maven.org/maven2/com/android/support/
does not exist anymore (404
). So the maven configuration seems to be the issue.
我发现一个GitHub的问题了解同样的问题,你通过运行更新SDK(你做了的话)和readding Android平台的离子项目中遇到并解决了:
I found a GitHub issue about the same problem you encountered and it was solved by running updating the SDK (which you did already) and readding the Android platform to the Ionic project:
# Update Android SDK
android list sdk
android update sdk --no-ui --filter extra
# Refresh Ionic Android configuration
ionic platform remove android
ionic platform add android
这篇关于生成错误的Android离子:构建失败,一个异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!