googlesamples / easypermissions

Simplify Android M system permissions
https://firebaseopensource.com/projects/googlesamples/easypermissions/
Apache License 2.0
9.87k stars 1.46k forks source link

Version conflict with support lib version 27.1.1 #217

Closed nareshkatta99 closed 6 years ago

nareshkatta99 commented 6 years ago

When I use this library with support library version 27.1.1, I'm getting error briefly version conflict with 27.1.0.

Where can I tweak to get it fixed?

samtstern commented 6 years ago

@Naresh-Katta can you show the dependencies block of your build.gradle?

nareshkatta99 commented 6 years ago
api "com.android.support:appcompat-v7:${suprtLibVrtn}"
api "com.android.support:design:${suprtLibVrtn}"
api "com.android.support:recyclerview-v7:${suprtLibVrtn}"
api "com.android.support:cardview-v7:${suprtLibVrtn}"
api 'pub.devrel:easypermissions:1.2.0'
and
ext {
    suprtLibVrtn = "27.1.1"
}
samtstern commented 6 years ago

@Naresh-Katta try adding dependencies on support-compat and support-fragment as well.

nareshkatta99 commented 6 years ago
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.1.1, 27.1.0. Examples include 
com. android. support : animated-vector-drawable:27.1.1 and com.android. support : exifinterface:27.1.0 more... (Ctrl+ F1) 

Still getting the issue.

emaborsa commented 6 years ago

Same issue here. Using the 27.1.0 it works, setting 27.1.1 I get the same error.

nareshkatta99 commented 6 years ago

Can't do more. They closed it without confirmation. Try to open as new issue.

samtstern commented 6 years ago

These are the libraries we depend on:

    api "com.android.support:appcompat-v7:$support_library_version"
    api "com.android.support:support-compat:$support_library_version"
    api "com.android.support:support-fragment:$support_library_version"

You should add explicit dependencies on each of those at whatever version you want. That will tell gradle what to do.

Any further problem is coming from another dependency or from your build customizations.

emaborsa commented 6 years ago

I took my dependencies, put it into an empty project and 'played' with them, in order to figure out the problem. In my case it was 'com.squareup.picasso:picasso:2.71828' to conflict with 'com.android.support:appcompat-v7:27.1.1'. By removing it, it works.

nareshkatta99 commented 6 years ago

@emaborsa is right. This issue not because of easypermissions. adding api "com.android.support:exifinterface:27.1.1"; worked like a charm for me