This question already has answers here:
Dependancy error when integrating android studio project with Firebase for a google sign in feature
(4 answers)
Closed 4 years ago.
I am setting up firebase with my android application and I am facing an error
implementation com.android.support:appcompat-v7:28.0.0 Issue id:GradleCompitable.
We want to upload picture on firebase with my android application.
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-database:16.0.1:15.0.0'
}
enter code here
This is the error I am facing:
Add 'implementation 'com.android.support:support-media-compat:28.0.0'
Your issue
Found versions 28.0.0, 26.1.0. Examples include
com.android.support:animated-vector-drawable:28.0.0 and
com.android.support:support-media-compat:26.1.0
To make this gradle dependency same as current version 28, you need to copy the version com.android.support:support-media-compat:26.1.0 and change it to com.android.support:support-media-compat:28.0.0
Add this and sync the project. If you again see the issue do the same till the issue resolves.
Related
I am trying to use autofill from google placesApi and distance/maps from the google maps Api.
I run into a compatible issue when I add both to my dependencies(version 26.1.0 for places). However, when I tried to fix it by implement cardview for 27.1.1, the map does not show anymore, and says "My App is having trouble with Google Play services".
My dependency is as follow:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-maps:10.0.1'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:design:27.1.1'
// 1. So far, Google Maps work
// 2. After adding the following code --> Compatibility issue (27.1.1 vs 26.1.0)
//implementation 'com.google.android.libraries.places:places-compat:1.1.0'
// 3. After adding the following code upfront --> My app having trouble with Google Play services
//implementation 'com.android.support:cardview-v7:27.1.1'
}
Could someone give me some insights on how I may fix this problem?
Thanks!
Im getting the error
The following classes could not be found:
- android.support.design.widget.CoordinatorLayout (Fix Build Path, Edit XML, Create Class)
- android.support.design.widget.NavigationView (Fix Build Path, Edit XML, Create Class)
- android.support.v4.widget.DrawerLayout (Fix Build Path, Edit XML, Create Class)
Tip: Try to build the project.
Heres my module app:
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
I've tried to rebuild, clean and change the implementations but nothings seems to work
Does anyone know how I could fix this?? it started when I updated android studio and created a new project.
Your dependency is mixed of support library and AndroidX which is not right. Refactor it to AndroidX using Android Studio.
Refactor > Migrate to AndroidX and press Do Refactor
You have to use
androidx.coordinatorlayout.widget.CoordinatorLayout
com.google.android.material.navigation.NavigationView
androidx.drawerlayout.widget.DrawerLayout
instead of
android.support.design.widget.CoordinatorLayout
android.support.design.widget.NavigationView
android.support.v4.widget.DrawerLayout
I'm following the tutorial https://www.youtube.com/watch?v=X5AOrAhyrkg&list=PLRRNzqzbPLd8Qldg1J3LFesfXW9hWM_t4&index=3&t=0s
But when I implement the library 'me.zhanghai.android.materialprogressbar:library:1.6.1' it causes some error.
I did take a look at Android Material and appcompat Manifest merger failed but when I try that solution on It doesn't work for me. I know that I'm using the latest version of AndroidX which is the problem. But I haven't figured it out yet.
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
So I hope to find a solution
This is what I encountered previously with third party libraries. This issue occurs when you are currently migrated to Androidx and the third party lib (in your case, 'me.zhanghai.android.materialprogressbar:library:1.6.1') is still using android support and it will clash causing the merge dex error.
I don't think if this will help, but do try adding this.
('me.zhanghai.android.materialprogressbar:library:1.6.1'){
exclude group: "com.android.support"
}
If it doesn't, you might have to post your issue on their github page and see if they can promise u an answer.
How to install lettuce library on Android studio in Gradle files ?
https://lettuce.io
is there any solution to compile the library ?
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.2'
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.1.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.0’
}
In the lettuce's getting started section there is a section called For Gradle Users on how to add the library from gradle. I think just adding:
implementation 'io.lettuce:lettuce-core:5.1.3.RELEASE'
would work. You must check if you must adjust your current dependencies and/or modify your proguard rules.
Hope I helped.
This question already has answers here:
All com.android.support libraries must use the exact same version specification
(54 answers)
Closed 4 years ago.
I'm trying to add a banner add to a new app of mine and I've hit a roadblock adding the Gradle dependencies. I've been following the Admob tutorial on how to do it Admob Get Started Link
What I'm trying to use is the following
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
implementation 'com.google.android.gms:play-services-ads:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'}
However the line with "appcompat-v7:27.1.1" gets underlined with the following message:
All com.android.support libraries must use the exact same version
specification, Found version 27.1.1, 26.1.0. Examples include
com.android.support:animated-vector-drawable:27.1.1
andcom.android.supports:customtabs:26.1.0
This underline warning only shows up when I add in the dependency for admob, specifically:
implementation 'com.google.android.gms:play-services-ads:17.0.0'
How/what should I be doing to fix this? I was testing this out earlier in the week and I didn't have any errors, the only thing I've added since then is permissions for phone vibration which I can't imagine has any effect. My app crashes on the opening screen
The issue is happening because there are two different versions of support libraries sync one by ads and another by app compat
To solve the issue use
configurations.all
{ resolutionStrategy.force 'com.android.supports:customtabs:27.1.1'
resolutionStrategy.force 'com.android.support:animated-vector-drawable:27.1.1'
}
dependencies { implementation fileTree(dir: 'libs', include: ['*.jar']
........
Have you tried adding the library with the old version, but with new version??
com.android.support:customtabs:26.1.0 is your error so you need to add this:
implementation "com.android.support:customtabs:27.1.1"
It's an confusing error because you are not directly using this library, but more of the libraries you use, depend on this one, so you have to explicitly set which version to use