Build failed with an exception:
What went wrong: Execution failed for task ':app:preDebugBuild'. Android dependency 'androidx.appcompat:appcompat' has different version for the compile (1.0.1) and runtime (1.0.2) classpath. You should manually set the same version via DependencyResolution
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v1.1.8, on Microsoft Windows [Version 10.0.17763.292], locale en-US)
[√] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[√] Android Studio (version 3.3)
[√] IntelliJ IDEA Ultimate Edition (version 2018.2)
[√] Connected device (2 available)
Solution 1: Rahul Mahadik
Please try by Adding following code to your android/build.gradle
file
subprojects {
project.configurations.all {
resolutionStrategy.eachDependency { details ->
if (details.requested.group == 'com.android.support'
&& !details.requested.name.contains('multidex') ) {
details.useVersion "28.0.0"
}
}
}
}
Please let me know is it worked for you. This documentation will helps you
Hope this will helps you
Solution 2: AnAIDE
just add below code in build.gradle
repositories { maven { url 'https://maven.google.com' } }