构建错误Ionic Android:构建因异常而失败

前端之家收集整理的这篇文章主要介绍了构建错误Ionic Android:构建因异常而失败前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我尝试为 Android构建一个离子应用程序,我有这个错误
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支持存储库.

谢谢您帮忙

编辑:

我尝试更新cordova和cordova-cli,但它没有用.

解决方法

位置https://repo1.maven.org/maven2/com/android/support/不再存在(404).所以maven配置似乎是个问题.

我发现a GitHub issue遇到了你遇到的同样问题,它通过运行更新SDK(你已经做过)并将Android平台读入Ionic项目来解决

# 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
原文链接:https://www.f2er.com/android/309888.html

猜你在找的Android相关文章