3

I was trying to import my flutter app into Android Studio to migrate to Androidx, not sure if these are the correct steps:

  1. FlutterProject > Open the Android module in Android Studio.
  2. My Android version is 3.2.0+, able to do Refactor > Migrate to AndroidX

While trying to migrate to Androidx, I received an Unresolved Dependecies error stating that:

ERROR: Failed to resolve: androidx.legacy:legacy-support-v4:27.1.1

Show in Project Structure dialog

Affected Modules: app

I couldn't find out where is this androidx.legacy:legacy-support-v4:27.1.1 located. I've tried implementing the Androidx build artifact, not working at all.

2
  • have you added maven to your repository's build.gradle? Commented Feb 14, 2019 at 9:23
  • 1
    Yes I did. It still didn't work, this ERROR: Failed to resolve: androidx.legacy:legacy-support-v4:27.1.1 keep showing. I'm avoiding AndroidX for now by removing ^ from each plugins. Commented Feb 20, 2019 at 2:05

1 Answer 1

2

I was able to migrate flutter project to support AndroidX without having to use Android studio.

Here's what I did..

  1. updated compileSdkVersion in build.gradle file to 28
  2. android.useAndroidX=true and android.enableJetifier=true in gradle.properties

Try this approach if all you want to do is migrate to AndroidX

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

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.