添加AdMob Pro后,Ionic android构建失败

时间:2015-08-04 12:13:06

标签: android cordova ionic

我刚刚开始使用离子框架来构建Android应用程序。所以我跑了:

ionic start App blank
ionic platform add android
ionic build android
ionic run android

到目前为止一切顺利,我可以在我的Android手机中测试我的应用程序没有问题。现在我想将admob添加到我的应用程序中。我决定使用AdMobPro,所以我这样做了:

ionic plugin add cordova-plugin-admobpro

该插件已成功添加。没有在我的app.js中实现admobpro代码,我试图再次运行ionic build android只是为了确保一切正常,我收到了这个错误:

Running: /home/vagrant/app/android-quotes/platforms/android/gradlew cdvBuildDebug -b /home/vagrant/app/android-quotes/platforms/android/build.gradle -
Dorg.gradle.daemon=true

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-ads:+.
     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/
     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: 11.603 secs

/home/vagrant/app/android-quotes/platforms/android/cordova/node_modules/q/q.js:126
                    throw e;
                          ^
Error code 1 for command: /home/vagrant/app/android-quotes/platforms/android/gradlew with args: cdvBuildDebug,-b,/home/vagrant/app/android-quotes/plat
forms/android/build.gradle,-Dorg.gradle.daemon=true
ERROR building one of the platforms: Error: /home/vagrant/app/android-quotes/platforms/android/cordova/build: Command failed with exit code 1
You may not have the required environment or OS to build this project
Error: /home/vagrant/app/android-quotes/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:134:23)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Process.ChildProcess._handle.onexit (child_process.js:1087:5)

之前有人有此错误吗?

更新24/8/2015 :我已经离开了离子盒并直接在我的Windows机器中重新安装离子,没有更多的错误。我不能使用离子盒有点失望,但我想这就是我必须走的路。

0 个答案:

没有答案
相关问题