3

I'm starting developing apps with flutter, and I encounter with this error when I clone a project from GitHub:

What went wrong?

Execution failed for task ':app:preDebugBuild'.
Android dependency 'androidx.appcompat:appcompat' has different version for the compile (1.0.0) and runtime (1.0.2) classpath. You should manually set the same version via DependencyResolution

I'm running Android Studio 3.2.2 and Flutter SDK 1.2.1

2 Answers 2

2

You need to migrate the project to Android X. You can only do this through Android studio 3.3.

Follow the procedures here to Migrate your Project to Android X

Sign up to request clarification or add additional context in comments.

1 Comment

Hi, thanks for your answer, i follow steps posted in that link, but when i try to do migration to Android X i get the message "No usages found in the project", even after sync project with gradle files. I try do that with Android Studio 3.5 canary 6
1

Finally i found a solution for the problem. Only need to add the following code on the build.gradle file:

configurations.all {
    resolutionStrategy {
        force 'androidx.media:media:1.0.0'
    }
}

Then, the app runs without any error.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.