Reputation: 603
So my flutter android app runs fine with firebase google services 4.0.1, but when I add the dependancy "firebase_auth" to pubspec.yaml, it produces this error:
Execution failed for task ':app:preDebugBuild'.
Android dependency 'android.arch.lifecycle:runtime' has different version for the compile (1.0.0) and runtime (1.1.1) classpath. You should manually set the same version via DependencyResolution
The package is gotten correctly in the pubspec. Any help would be appreciated.
Upvotes: 4
Views: 1931
Reputation: 4081
Add this to your android/build.gradle
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'android.arch.lifecycle'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "1.1.1"
}
}
}
}
Upvotes: 0
Reputation: 56
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.
Upvotes: 4