Ionic Run Faild

时间:2015-06-21 09:03:54

标签: android cordova gradle ionic

我可以完美地在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 version that matches org.xwalk:xwalk_core_library_beta:13+.
 Searched in the following locations:
     https://repo1.maven.org/maven2/org/xwalk/xwalk_core_library_beta/maven-metadata.xml
     https://repo1.maven.org/maven2/org/xwalk/xwalk_core_library_beta/
     https://download.01.org/crosswalk/releases/crosswalk/android/maven2/org/xwalk/xwalk_core_library_beta/maven-metadata.xml
     file:/Applications/android-sdk/extras/android/m2repository/org/xwalk/xwalk_core_library_beta/maven-metadata.xml
     file:/Applications/android-sdk/extras/android/m2repository/org/xwalk/xwalk_core_library_beta/
     file:/Applications/android-sdk/extras/google/m2repository/org/xwalk/xwalk_core_library_beta/maven-metadata.xml
     file:/Applications/android-sdk/extras/google/m2repository/org/xwalk/xwalk_core_library_beta/
 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: 20.525 secs

/Users/myuser/Projects/appname/platforms/android/cordova/node_modules/q/q.js:126
                throw e;
                      ^
Error code 1 for command: /Users/myuser/Projects/appname/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/myuser/Projects/appname/platforms/android/build.gradle,-PcdvBuildArch=x86,-Dorg.gradle.daemon=true

我删除了android platform和所有node_modules并再次添加了它们,但我仍然看到了这个错误。 我可以serve我的应用程序,并在IOS模拟器上完美运行。

2 个答案:

答案 0 :(得分:2)

我遇到了同样的问题! 我通过以下步骤解决了这个问题:

  • 使用ionic browser revert android
  • 删除浏览器
  • 再次安装人行横道ionic browser add crosswalk
  • 部署应用程序ionic run android

答案 1 :(得分:1)

我在android SDK

中使用Google Play服务和Google Repository找到了问题的解决方案

请使用Android SDK管理器Google Play servicesGoogle Repository

安装以下依赖项

安装完成后,您就可以创建项目并运行。 现在它应该工作正常

enter image description here