mardi 4 août 2015

Ionic android build failed after added AdMob Pro

I just started to use ionic framework to build android apps. So I've run:

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

So far so good, I can test my app in my android phone with no problem. Now I want to add admob to my app. I decided to use the AdMobPro, so I did this:

ionic plugin add cordova-plugin-admobpro

The plugin added successfully. Without having implemented the admobpro code in my app.js, I tried to run ionic build android again just to make sure everything is ok, I got this error:

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:
         http://ift.tt/1fhRit3
         http://ift.tt/1MMeoCs
     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)

Anyone has this error before?

Aucun commentaire:

Enregistrer un commentaire