After the new update of the admob SDK now we need to import the google play service project to our projects to monetize and show ads in our apps. I am creating an app with A
remove com.google.playservices plugin and add the plugin via this command cordova plugin add https://github.com/MobileChromeApps/google-play-services.git
UPDATE:
You can also use this plugin OR you can add this line in your plugin.xml to add this plugin as dependency.
<dependency id="com.google.playservices" />
Follow these steps to solve the problem:
ANDROID_SDK_PATH\extras\google\google_play_services\libproject\ to your project root directory.(i.e. platform/android)project_root_folder/Cordova lib folder to google-play-services_lib folder.project.properties file's project target to the right target (i.e. android 19).Open the project.properties from your Project Root folder and change reference 2 like this :
android.library.reference.1=CordovaLib
target=android-19
android.library.reference.2=google-play-services_lib
Goto the google-play-services folder in your project and run :
android update project -p . (don't forget dot)
Then run following commands:
ant debug
ant release
If you get any error then first run 'ant clean debug' then follow step 6.
Now you can run cordova build android OR if you are using ionic then ionic build android.