I am trying to build my flutter app but it gives this error:
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
here is my android/build.gradle file:
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
allprojects {
repositories {
google()
jcenter()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "28.0.0"
}
}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
try upgrading the gradle dependency: classpath from 'com.android.tools.build:gradle:3.2.1'
to 'com.android.tools.build:gradle:3.3.1'
Change versions in your project level build.gradle
file
kotlin_version
- 1.3.0
com.android.tools.build:gradle:3.3.2
version - 3.3.2
com.google.gms:google-services:4.3.2
version - 4.3.2
Change versions in your project level build.gradle file
Update kotlin_version
, com.android.tools.build:gradle:
, com.google.gms:google-services:
to the latest versions.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With