Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error with AdMob Free Plugin #515

Closed
danielpalen opened this issue Dec 23, 2017 · 5 comments
Closed

Error with AdMob Free Plugin #515

danielpalen opened this issue Dec 23, 2017 · 5 comments

Comments

@danielpalen
Copy link

When installing this plugin in combination with AdMob Free 'ionic cordova build android' the process throws the following error.

FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzau.class

* 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: 9.655 secs

Error: /Users/Daniel/Code/baseball/baseball_app/platforms/android/gradlew: Command failed with exit code 1 Error output:
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/internal/zzau.class

This error is clearly introduced by the combination of the two plugins. I checked this in a fresh ionic project where I only installed these two plugins and got the same error.

I did find this issue which seems to have a similar problem (#387). Removing the following two lines from plugin.xml in this repo did not solve the error though.

<framework src="com.google.gms:google-services:+" />
<framework src="com.google.android.gms:play-services-tagmanager:+" />
@Calsy
Copy link

Calsy commented Jan 2, 2018

Receiving same issue as above.

@bulbul-ismail
Copy link

+1

@bulbul-ismail
Copy link

bulbul-ismail commented Jan 6, 2018

downgrading version of AdMob plugin resolved my issue
remove old admob plugin then
ionic cordova plugin add cordova-plugin-admob-free@0.12.1

@soumak77
Copy link
Contributor

@write2sandip
Copy link

write2sandip commented May 27, 2018

use https://www.npmjs.com/package/cordova-plugin-firebase-extended-notification plugin with admob free it works just

manually edit

cordova.system.library.1=com.google.android.gms:play-services-base:10.+
cordova.system.library.2=com.google.android.gms:play-services-ads:10.+
cordova.system.library.3=com.google.firebase:firebase-core:10.+
cordova.system.library.4=com.google.firebase:firebase-messaging:10.+
cordova.gradle.include.1=cordova-plugin-fcm-with-dependecy-updated/epapers-FCMPlugin.gradle
cordova.gradle.include.2=cordova-plugin-firebase-extended-notification/epapers-FirebaseExtendedNotification.gradle

in project.properties file

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants