Hi,
since yesterday I'm unable to build my project. No changes have been made on my side, and the build was working perfectly 3 days ago. If I remove this plugin the build is working again.
The error is this:
* What went wrong:
Execution failed for task ':app:transformDexArchiveWithExternalLibsDexMergerForDebug'.
> java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
Running gradlew with stacktrace option enabled we got this:
...
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: com.android.builder.dexing.DexArchiveMergerException: Unable to merge dex
....
Caused by: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/measurement/zzkt;
I have noticed this:
....
Download https://maven.google.com/com/google/firebase/firebase-analytics/16.0.0/firebase-analytics-16.0.0.pom
Download https://maven.google.com/com/google/firebase/firebase-measurement-connector-impl/16.0.0/firebase-measurement-connector-impl-16.0.0.pom
Download https://maven.google.com/com/google/firebase/firebase-iid/maven-metadata.xml
Download https://maven.google.com/com/google/firebase/firebase-measurement-connector/16.0.0/firebase-measurement-connector-16.0.0.pom
Download https://maven.google.com/com/google/firebase/firebase-abt/16.0.0/firebase-abt-16.0.0.pom
Download https://maven.google.com/com/google/firebase/firebase-iid-interop/16.0.0/firebase-iid-interop-16.0.0.pom
Download https://maven.google.com/com/google/firebase/firebase-analytics/maven-metadata.xml
Download https://maven.google.com/com/google/firebase/firebase-messaging/17.0.0/firebase-messaging-17.0.0.aar
Download https://maven.google.com/com/google/firebase/firebase-config/16.0.0/firebase-config-16.0.0.aar
Download https://maven.google.com/com/google/firebase/firebase-measurement-connector-impl/16.0.0/firebase-measurement-connector-impl-16.0.0.aar
Download https://maven.google.com/com/google/firebase/firebase-crash/16.0.0/firebase-crash-16.0.0.aar
Download https://maven.google.com/com/google/firebase/firebase-auth/16.0.1/firebase-auth-16.0.1.aar
Download https://maven.google.com/com/google/firebase/firebase-core/16.0.0/firebase-core-16.0.0.aar
Download https://maven.google.com/com/google/firebase/firebase-perf/16.0.0/firebase-perf-16.0.0.aar
....
So seems like this could be the cause. As per this firebase releases note link, there have been a bunch of updates between May 23 and May 24.
In this stackoverflow post people are discussing a similar error, caused by another firebase update, solved by upgrading the google-services plugin. I have tried to update it, but no luck. I will try to update it to 4.0.1, released yesterday, and report back results.
If somebody has any clue to solve this, please, share it. I need to build a new version of my app urgently (you know, gdpr stuff).
Thanks in advanced.
Whats in your build gradle, are you just using + as your version?
it may be you need to go back to the versions you were using a few days ago..
@markterrill I'm not editing manually any file inside platforms folder. I'm using cordova-android-play-services-gradle-release plugin. Futhermore, my build was working 2 days ago without any code change.
I have tried google-services 4.0.1 with no luck.
I'm out of ideas...
I'm having same issue since yesterday. Tried everything, nothing works.
More info:
Here seems to be more people affected.
I have tried to modify all firebase versions declared in this plugin to 15.+ but no luck either...
No.. the fix is SUPER EASY.
Just call cordova clean. Thats it. It will work again after that. You can stay with +, no need to set it to 15+.
The issue is, gradle caches precompiled files to increase the time building your app. After dependencies got updated, you need to tell cordova to clear the cache, so the next build will take a bit longer but everything will be recompiled again.
I have called cordova clean multiple times, as well as platform
remove/platform add... No luck.
El vie., 25 may. 2018 21:13, Hirbod notifications@github.com escribió:
No.. the fix is SUPER EASY.
Just call "cordova clean". Thats it. It will work again after that.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/arnesson/cordova-plugin-firebase/issues/705#issuecomment-392154236,
or mute the thread
https://github.com/notifications/unsubscribe-auth/APL4ZODFThO3Kp4w3BzX1MaJXjHltgPNks5t2FfggaJpZM4UNdy-
.
Well try to reinstall the platform. I had the same issue today and a simple cordova clean fixed it for me
Here same issue,
this plugin and cordova-android-play-services-gradle-release in the same project not work.
i have tried clean, re-add platform, force dependency to 15.+, to 16.+, i have changed cordova platform to 7.0.0, 7.1.0, 6.x with no solutions... Only solution for me is remove cordova-android-play-services-gradle-release , the problem is that i need admob-free plugin in the same project :'(
@xfr4xx Thanks!! Is indeed a conflict with cordova-android-play-services-gradle-release. I can build again after delete that plugin. Weird indeed since that plugin is supposed to avoid this kind of problems...
If I got time, I will investigate what the cause of this conflict could be and report back to that plugin repo.
I understand that this error is not a bug with this cordova-plugin-firebase plugin, so the issue can be closed.
BTW, I have managed to solve the admob-free plugin play-services version conflict by using the preference PLAY_SERVICES_VERSION in cordova-admob-sdk as stated in its github: https://github.com/rehy/cordova-admob-sdk
In config.xml:
<plugin name="cordova-admob-sdk" spec="^0.17.0">
<variable name="PLAY_SERVICES_VERSION" value="15.+" />
</plugin>
In package.json:
"cordova-admob-sdk": {
"PLAY_SERVICES_VERSION": "15.+"
}
And then remove and re add android platform.
I have the same issue, without changing anything in my code.
first error was :transformClassesWithDexForDebug, which i got fixed by adding multiDexEnabled true to my build.grade defaultConfig. After that, :transformClassesWithJarMergingForDebug showed up.
cordova clean not helping
removing cordova-android-play-services-gradle-release did not help either.
removing and adding the android platform created a whole bunch of new errors, so so made a rollback.
updated a bunch of plugins; updated cordova itself. nothing does help
can't get my work done. android sucks :/
Closing as fixed per the updated instructions in the README. Please reopen if this issue persists with the latest version after following those instructions.
Most helpful comment
Here same issue,
this plugin and cordova-android-play-services-gradle-release in the same project not work.
i have tried clean, re-add platform, force dependency to 15.+, to 16.+, i have changed cordova platform to 7.0.0, 7.1.0, 6.x with no solutions... Only solution for me is remove cordova-android-play-services-gradle-release , the problem is that i need admob-free plugin in the same project :'(