ratson / cordova-plugin-admob-free

New development has been moved to "admob-plus-cordova", https://github.com/admob-plus/admob-plus/tree/master/packages/cordova
https://github.com/admob-plus/admob-plus
MIT License
499 stars 214 forks source link

Compatibility with FCM #126

Open pjoriginal opened 6 years ago

pjoriginal commented 6 years ago

I tried using the FCM plugin with the admob-free plugin in ionic. They both work perfectly if used independently.

But an error pops up saying: Found com.google.android.gms:play-services-base:+, but version 9.0.0 is needed for the google-services plugin. Found com.google.android.gms:play-services-ads:+, but version 9.0.0 is needed for the google-services plugin.

Is there a workaround to the compatibility issue?

wo-github commented 6 years ago

You can try to remove platform and add platform again.

pjoriginal commented 6 years ago

Worked around the issue by using this firebase Plugin instead. This seems to be compatible. :)

ratson commented 6 years ago

@pjoriginal Would you try the latest version to see if it resolves this issues?

pjoriginal commented 6 years ago

Doesn't work..

Steps to recreate..

$ cordova plugin add cordova-plugin-firebase $ cordova plugin add cordova-plugin-admob-free $ cordova build android

itsyub commented 6 years ago

@pjoriginal You can set play service version to "+" instead of specific version. As firebase plugin uses newer version of playservices. you need to set it to "+" , so that this plugin also use the same version which will be used by firebase plugin. `

`.

I had the same issue with firebase plugin used with admob-free plugin. Now it's working file.

jbreed commented 6 years ago

Went to implement AdMobs today and ran into this issue. I tried switching over from FCM to the beta Firebase plugin, but had even more issues. Not sure if this is because I'm running android@6.4 due to imagepicker failing on 7.0

@itsyub I attempted this with admob free, but this didn't seem to rid the error.

Has there been any progress on this, or a defined solution? I ended up reverting everything back to my original code and leaving ads out of the mix for now.

itsyub commented 6 years ago

@jbreed please share your error

tominou commented 6 years ago

All play services/firebase versions need to be the same in platform/android/project.properties, you can edit it manually and set them all to latest version: 12.0.1

netidjen commented 6 years ago

I have another issue, could anyone help me please? https://github.com/ratson/cordova-plugin-admob-free/issues/216

@pjoriginal have you found the solution for this issue?

PalakjainJain commented 5 years ago

Any one found the solution??? I tried all the options mention above. But nothing is working for me :-(

pjoriginal commented 5 years ago

Replacing the default framework dependency in the admob sdk with `

` worked for me.
itsyub commented 5 years ago

Replacing the default framework dependency in the admob sdk with <platform name="android"> <framework src="com.google.firebase:firebase-ads:+" /> </platform> worked for me

@PalakjainJain have you used this fix. If used make sure you will run "cordova clean" before building. Thanks.

pjoriginal commented 5 years ago

Replacing the default framework dependency in the admob sdk with <platform name="android"> <framework src="com.google.firebase:firebase-ads:+" /> </platform> worked for me

@PalakjainJain have you used this fix. If used make sure you will run "cordova clean" before building. Thanks.

@itsyub, In extreme cases where the app is awkwardly configured, it definately works after you've removed the platform and added it again.

P.S. Yes I have used this fix and the app is even live now.

itsyub commented 5 years ago

@pjoriginal The reason why I specifically wrote about cordova clean because if you change plugin file and build a project, project.properties file won't get updated. To make it work you have to clear old build config files. Thanks.