question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Please don't pin your play-services dependency at a particular version

See original GitHub issue

It causes issues with other libs when a 3rd-party library, like yours, pins its play-services dependencies at a particular version.

eg:

Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/iid/MessengerCompat$1;
Unknown source file :   at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596)
Unknown source file :   at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554)
Unknown source file :   at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535)
Unknown source file :   at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171)
Unknown source file :   at com.android.dx.merge.DexMerger.merge(DexMerger.java:189)
Unknown source file :   at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502)
Unknown source file :   at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334)
Unknown source file :   at com.android.dx.command.dexer.Main.run(Main.java:277)
Unknown source file :   at com.android.dx.command.dexer.Main.main(Main.java:245)
Unknown source file :   at com.android.dx.command.Main.main(Main.java:106)

You have

compile 'com.google.android.gms:play-services-gcm:8.3.0'

You need to change it to:

compile 'com.google.android.gms:play-services-gcm:+'

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:12
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

3reactions
christocracycommented, Aug 16, 2016

In addition, I question the wisdom of including the entire ‘play-services-gcm` just to fetch the gcm identifier. This should be the responsibility of some other module which is doing Push requests. This module has no business dealing with this.

2reactions
GantMancommented, Aug 25, 2016
Read more comments on GitHub >

github_iconTop Results From Across the Web

Found com.google.android.gms:play-services-gcm:8.3.0, but ...
I just updated Google play services to the latest release - 23 - in the Android SDK Manager. Next I updated dependency in...
Read more >
Android dependency 'com.google.firebase:firebase ...
Solutions tried: Tired to change the version of com.google.firebase:firebase-messaging to 19.0.0 in Build.gradle file.
Read more >
Developer Program Policy - Play Console Help
If your app contains or promotes financial products and services, you must comply with state and local regulations for any region or country...
Read more >
Why are minor versions of dependencies pinned, despite ...
JavaScript, when saving dependencies for a further npm install , will pin the libraries to exact specific versions. It is also possible (and ......
Read more >
Should You Use Upper Bound Version Constraints?
This means every single major release of every dependency you cap immediately requires you to make a new release or everyone using your...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found