Android dependency '..' has different version for the compile (..) and runtime (..) classpath
It appears that, previously, you were implicitly depending on the common-lib module to export Firebase SDKs to your app module. Now that you've changed from "compile" to "implementation", you're no longer exporting those SDKs. So, what's happening now is this: the google-services plugin is adding v9.0.0 of firebase-core to your app module since it no longer sees it present in the visible classpath of your app module.
You should be able to work around this by manually adding firebase-core to your app module at the correct version. Or, you can continue to export Firebase SDKs from your library module to your app module by switching to an "api" dependency instead of an "implementation" dependency.
Android dependency has different version for the compile and run time: runing FCM dependency
Replace
classpath 'com.android.tools.build:gradle:3.2.1'
with
classpath 'com.android.tools.build:gradle:3.3.0'
Android dependency 'android.arch.lifecycle:runtime' has different version for the compile (1.0.0) and runtime (1.1.1) classpath
add to app level build.gradle.
implementation "android.arch.lifecycle:extensions:1.1.1"
testImplementation "android.arch.core:core-testing:1.1.1"
Good Luck dear.
Flutter - Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.1) classpath
Android dependency 'androidx.core:core' has different version for the
compile (1.0.0) and runtime (1.0.1) classpath. You should manually set
the same version via DependencyResolution
You should try with
- Change
gradle
version from 3.2.1 to 3.3.1/ 3.3.2
DEMO
dependencies {
classpath 'com.android.tools.build:gradle:3.3.1'
}
If same problem coming then add
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "27.1.1"
}
if (details.requested.group == 'androidx.core'
&& !details.requested.name.contains('androidx') ) {
details.useVersion "1.0.1"
}
}
}
}
}
Android dependency 'android.arch.lifecycle:runtime' has different version for the compile and runtime
You need to bump your gradle's version. Go to project's root build.gradle and bump ext.kotlin_version and gradle version in classpath:
buildscript {
ext.kotlin_version = '1.3.50' // make it at least 1.3.0
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.2' // make it at least 3.3.1
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
Add these to gradle.properties:
android.useAndroidX=true
android.enableJetifier=true
In case you get error like this: Error:Cannot fit requested classes in a single dex file.Try supplying a main-dex list. # methods: 72477 > 65536
. Go to app/build.gradle:
Option 1: bump minSdkVersion: minSdkVersion 21
Option 2: Add multiDexEnabled true
to defaultConfig and implementation 'com.android.support:multidex:1.0.3'
to dependencies:
android {
...
defaultConfig {
...
minSdkVersion 21 // bump minSdk
multiDexEnabled true // add this
}
}
dependencies {
implementation 'com.android.support:multidex:1.0.3' // add this
...
}
Related Topics
Bind Service to Activity in Android
Method Not Found Using Digestutils in Android
Android Parcelable -- Retailerorderactivity.Java Return Null
Android Adb Device Offline, Can't Issue Commands
Using Getresources() in Non-Activity Class
Imageview Be a Square with Dynamic Width
Android and Setting Width and Height Programmatically in Dp Units
Update an Android App (Without Google Play Store Visit)
Android Hide/Unhide App Icon Programmatically
Google Cloud Endpoints and User's Authentication
How to Make Alarm Manager Work When Android 6.0 in Doze Mode
Navigation Drawer: How to Set the Selected Item at Startup
React Native Android Fetch Failing on Connection to Local API
Creating a Custom Layout for Preferences
"An Internal Error Occurred" with Integration of Google Plus Login