play-services-ads conflicts with appcompat
You are using
implementation 'com.google.android.gms:play-services-ads:18.2.0'
Google Play services migrated to AndroidX in the latest release.
Dependencies using groupId com.android.support and androidx.* can not be combined
It means that you are using both, support libraries and androidx libraries.
You can:
- migrate to androidx as described below (in your case you have to migrate appcompat to
implementation 'androidx.appcompat:appcompat:1.0.2'
) - downgrade your google play ads dependencies (but it is not a real solution because you have to migrate sooner or later)
You can check the official release notes:
Warning: This release is a MAJOR version update and breaking change.
The latest update to Google Play services and Firebase includes the following changes:
Migration from Android Support Libraries to Jetpack (AndroidX) Libraries. Libraries will not work unless you make the following changes in your app:
- Upgrade
com.android.tools.build:gradle
to v3.2.1 or later. - Upgrade
compileSdkVersion
to 28 or later. - Update your app to use Jetpack (AndroidX); follow the instructions in Migrating to AndroidX.
Android studio play-services-ads:12.0.1 conflicts with appcompat-v7:27.1.0
In your app level build.gradle
:
android {
configurations.all {
resolutionStrategy.force 'com.android.support:support-v4:27.1.1'
}
}
This will tell your gradle configuration to forcefully pick and apply support-v4:27.1.1
everywhere it's imported!
Hope this helps!
appcompat-v7:27.1.1 conflicts with play-services:11.0.1
The problem is that you have some transient dependencies in this libraries. Whenever this happens you can explicitly add the conflicting dependencies and match them with your current version:
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support:mediarouter-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
Incompatible appcompat and play-services-vision dependencies between app: compat-v7: 28.0.0 and play-services-vision: 18.0.0
Problem is happening because you are using the Support Library along with the version 18.0.0
of the play-services-vision
library which already migrated to AndroidX.
You can see HERE that some libraries migrated to Android X (such as the play-services-vision
)
So, you are getting this error because your app is using Support Library but play-services-vision
is already using AndroidX.
In order to fix:
1) Migrate your app to AndroidX (recommended). More info HERE
2) Use an old version of play-services-vision (such as 'com.google.android.gms:play-services-vision:16.2.0'
for example.)
This second option may fix your issue because play-services-ads:16.0.0
was still using Support Library as well.
Adding Google Play Services to an android app results in 'com.android.support and androidx.* conflict'
Your error is pretty self explanatory. It says:
Dependencies using groupId com.android.support and androidx.* can not be combined
that means, you're mixing up support
and androidx
dependencies.
To be more clear, you're using support libraries pretty much everywhere, i.e anything containing com.android.support
in your app/build.gradle
, but, the latest library for ads uses Androidx
dependencies.
You can fix the error by converting your app dependencies to androidx
, as the latest play-services-ads
library uses Androidx dependencies, or, alternatively, you can use the older version of play-services-ads which used support dependencies (not recommended as support libraries are no longer maintained).
You can find how to migrate to androidx
here.
Regarding your another error regarding Manifest merger failed, you can fix it by following the instructions from the answer given here.
Google Play Services and Firebase conflicts
Change this:
implementation 'com.google.android.gms:play-services:11.8.0'
into this:
implementation 'com.google.android.gms:play-services:12.0.1'
appcompat-v7:27.1.1 conflicts with firebase-ads:15.0.1
One of your dependencies is internally using an older support library version. The best solution is to force it to use a newer one, just add this to dependencies:
implementation 'com.android.support:customtabs:27.1.1'
Related Topics
How to Get Code Coverage Using Android Studio
How to Change The Navigationview's Item Text Size
How to Install Android Studio on Ubuntu
How to Implement Zoom Effect for Image View in Android
Why to Use Handlers While Runonuithread Does The Same
Why Does Flag_Activity_Clear_Top Not Work
How to Handle Empty Response Body with Retrofit 2
How to Make My Layout Able to Scroll Down
Mediaplayer Stop Playing After About 5 Seconds
Is There an Android Based Google Glass Emulator
Android Httpclient File Upload Data Corruption and Timeout Issues
Sqlitedatabase Close() Function Causing Nullpointerexception When Multiple Threads
Captured Photo Orientation Is Changing in Android
How to Discover Zeroconf (Bonjour) Services on Android? I'M Having Trouble with Jmdns