【问题标题】:ionic android build failing with exception离子 android 构建失败并出现异常
【发布时间】:2015-10-31 13:31:21
【问题描述】:

尝试使用 ionic 构建我的第一个应用程序。 我添加了 phonegap-plugin-push 可能是这里出了点问题,无法弄清楚。尝试更新android SDK,安装并重新安装。项目仅使用 ionic start appName 启动

我在启动项目时没有提及任何包标识符。我刚刚做了 ionic platform add android 来将 android 添加到项目中。

在运行 ionic build android 时粘贴下面的日志。

FAILURE: Build failed with an exception.
* 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.google.android.gms:play-services-gcm:+.
 Searched in the following locations:
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/maven-metadata.xml
     https://repo1.maven.org/maven2/com/google/android/gms/play-services-gcm/
     file:/Users/Yashwanth/NVPACK/android-sdk-macosx/extras/android/m2repository/com/google/android/gms/play-services-gcm/maven-metadata.xml
     file:/Users/Yashwanth/NVPACK/android-sdk-macosx/extras/android/m2repository/com/google/android/gms/play-services-gcm/
 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: 3.125 secs

    /Users/Yashwanth/appName/platforms/android/cordova/node_modules/q/q.js:126
                throw e;
                ^
Error code 1 for command: /Users/Yashwanth/appName/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/Yashwanth/appName/platforms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /Users/Yashwanth/appName/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /Users/Yashwanth/appName/platforms/android/cordova/build: Command failed with exit code 1
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:139:23)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:817:16)
at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

问题似乎与配置推送有关。请帮我解决一下。

【问题讨论】:

  • 您可以尝试安装最新版本的 Android Support RepositoryAndroid Support LibraryGoogle Play Services 和 Google Repository 在 Android SDK 管理器中。

标签: android cordova push-notification google-cloud-messaging ionic


【解决方案1】:

在 Android SDK 管理器上添加 Google 存储库修复了它。

【讨论】:

    猜你喜欢
    • 2021-11-11
    • 1970-01-01
    • 1970-01-01
    • 2016-11-27
    • 2017-06-15
    • 1970-01-01
    • 2015-12-19
    • 2021-12-21
    • 2022-07-20
    相关资源
    最近更新 更多