【问题标题】:Build error Ionic Android : Build failed with an exception构建错误 Ionic Android:构建失败并出现异常
【发布时间】:2015-10-21 17:58:59
【问题描述】:

我尝试为 android 构建一个 ionic 应用程序,但出现此错误:

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 Support Library 和 Android support Repository 已安装。

感谢您的帮助

编辑:

我尝试更新cordova和cordova-cli,但没有成功。

【问题讨论】:

标签: android cordova google-cloud-messaging ionic


【解决方案1】:

位置 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

【讨论】:

【解决方案2】:

请在related question 中查看我的回答。

简而言之:错误的来源可能是依赖于 com.android.support:support-v4 支持库的插件。

如果你使用cordova >= 5.0.0 更新到新的官方插件。

【讨论】:

    猜你喜欢
    • 2023-03-03
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-12-21
    • 2022-07-20
    • 1970-01-01
    相关资源
    最近更新 更多