构建错误Ionic Android:构建失败,出现异常 [英] Build error Ionic Android : Build failed with an exception
本文介绍了构建错误Ionic Android:构建失败,出现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我尝试为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
感谢您的帮助
编辑:
我尝试更新cordova和cordova-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(你已经)和读取Android平台到Ionic项目解决:
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
这篇关于构建错误Ionic Android:构建失败,出现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文