离子Android构建失败

时间:2017-05-21 21:31:18

标签: android cordova ionic-framework

我正在尝试构建此应用程序(我已成功构建iOS版本)

当我运行离子cordova构建android时,我得到以下输出

  FAILURE: Build failed with an exception.

        * What went wrong:
        A problem occurred configuring root project 'android'.
        > Could not resolve all dependencies for configuration ':_armv7DebugCompile'.
           > Could not find any matches for com.google.android.gms:play-services-ads:+ as no versions of com.google.android.gms:play-services-ads are available.
             Searched in the following locations:
                 https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml
                 https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/
                 https://jcenter.bintray.com/com/google/android/gms/play-services-ads/maven-metadata.xml
                 https://jcenter.bintray.com/com/google/android/gms/play-services-ads/
                 https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml
                 https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-ads/
                 file:/C:/Android/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/maven-metadata.xml
                 file:/C:/Android/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/
             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: 19.489 secs
        Error: cmd: Command failed with exit code 1 Error output:
        FAILURE: Build failed with an exception.

        * What went wrong:
        A problem occurred configuring root project 'android'.
        > Could not resolve all dependencies for configuration ':_armv7DebugCompile'.
           > Could not find any matches for com.google.android.gms:play-services-ads:+ as no versions of com.google.android.gms:play-services-ads are available.
             Searched in the following locations:
                 https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml
                 https://repo1.maven.org/maven2/com/google/android/gms/play-services-ads/
                 https://jcenter.bintray.com/com/google/android/gms/play-services-ads/maven-metadata.xml
                 https://jcenter.bintray.com/com/google/android/gms/play-services-ads/
                 https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-ads/maven-metadata.xml
                 https://download.01.org/crosswalk/releases/crosswalk/android/maven2/com/google/android/gms/play-services-ads/
                 file:/C:/Android/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/maven-metadata.xml
                 file:/C:/Android/android-sdk/extras/android/m2repository/com/google/android/gms/play-services-ads/
             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.

1 个答案:

答案 0 :(得分:0)

打开Android SDK Manager。验证您是否已安装:Android支持存储库,Google Play服务和Google存储库(如下图所示)。如果没有,请安装它。

Android SDK Manager