This is the library I am using: https://github.com/ArthurHub/Android-Image-Cropper
The grade sync fails after adding it. Before that, there is no problem.
Apparently, the library you are using uses an older version of the support library v25.3.1, and it is conflicting with the one you have.
Try the following:
compile ('com.theartofdev.edmodo:android-image-cropper:2.4.+') {
exclude group: 'com.android.support'
}
However there are no guarantees that the library would work considering a different version.
Related
One library is using org.koin:koin-android:2.1.6 and other is using org.koin:koin-android:1.0.2.
Now if I use both of these libraries together, I get classDefNotFound.
If i force "2.1.6", second library starts crashing, and if i use "1.0.2" first starts crashing.
implementation('library') {
exclude group: 'org.koin', module: 'koin-android'
}
So exclude, force are not possible, as "koin" has added some new classes in their latest version.
What should be the solution in this case. Is it possible to keep different version of libraries, or define some kind of alias, so both libraries use their respective version without any issue.
So I am trying to use this library in my android app to be able to show pdf files. However, when I add the install line to my build.gradle file, Android Studio says that all Android support libraries should use the same version. This happens because the library uses com.android.support:support-compat:26.1.0 while my project is using com.android.support:appcompat-v7:28.0.0.
I want to know if there is a way to get around this and use the library in my project, or if I would have to fork and update the library myself to make it work.
Any help is appreciated.
simply exclude it from the build:
api ("com.github.barteksc:android-pdf-viewer:2.8.2") {
exclude group: "com.android.support", module: "appcompat-v7"
}
I get following warning:
All com.android.support libraries must use the exact same version specification...
I know what that means, but now I'm stuck on how to easily find out which dependency does include the conflicting versions. I want to exclude the support library from them like following:
compile ('...') {
exclude group: 'android.support'
}
But how do I identify the dependencies that are responsible?
You can watch full gradle dependency tree tree using the command below-
gradle app:dependencies
Reference
In my project I'm compiling against sdk-version 23 and using the compat/support libraries version 23.2.0.
Now I'm trying to update the play-services-version from 9.2.1 to 10.2.0
compile 'com.google.android.gms:play-services-base:10.2.0'
But making this change ads the com.android.support:support-v4:24.0.0 library to my project making my project to crash due with strange not found errors in the compat libraries like explained in this question.
How can I avoid that? should I skip the play-services update? can I avoid them to raise the version of the support-v4 lib?
Maybe it could work with something like this:
compile('com.google.android.gms:play-services-base:10.2.0') {
exclude group: 'com.android.support'
}
or if this does not work then maybe:
compile('com.google.android.gms:play-services-base:10.2.0') {
exclude group: 'com.android.support', module: 'support-v4'
}
Or maybe you don't need the whole base play services and only specific packages as defined here
I use Android Studio for my project.
I want to use custom appcompat-v7 library in my android project.
Android design support library has it own appcompat-v7 library.
my gradle
compile(':mycustomAppcompat-v7')
compile 'com.android.support:design:23.2.0'
My problem:
I have two appcompat-v7 library that come from:
1-My custom library.
2-Design support needed.
how can i fix it?
thank you
You can exclude specific modules from libraries you compile with gradle. This feature is valuable in a number of specific situations, like when you have conflicting or duplicated modules as in your case. To fix this, you can explicitly determine which modules you would like to exclude from compilation in gradle as follows:
compile('com.android.support:design:23.2.0'){
exclude module: 'appcompat-v7'
}
This says you want to compile com.android.support:design:23.2.0 but you want to exclude its appcompat-v7 module since you are utilizing your custom one.