Contains references to both AndroidX and old support library

8,394

This warning exist because on the latest Flutter versions newly created projects will be created with AndroidX automatically.

Starting from Flutter v1.12.13, new projects created with flutter create -t <project-type> use AndroidX by default.

Projects created prior to this Flutter version must not depend on any old build artifact or old Support Library class.

In an app or module project, the file android/gradle.properties or .android/gradle.properties must contain:

android.useAndroidX=true
android.enableJetifier=true

The warning also stated:

This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway.

This is usually caused by some plugins that was not migrated and Flutter tool uses Jetifier which will automatically migrate those Flutter plugins using the Support Library to AndroidX.

The Flutter tool uses Jetifier to automatically migrate Flutter plugins using the Support Library to AndroidX, so you can use the same plugins even if they haven’t been migrated to AndroidX yet.

You can open an issue to GitHub if you've encounter other issues when migrating to AndroidX.

Share:
8,394
Nicks
Author by

Nicks

Also known as nicks258, I am a Java enthusiast, making whatever GUI I can think of. I'm still learning and exploring Java. Some of my android apps include:Beacons, Funshoppers, NewsFeed, Event Creator(and much more). These are not extremely impressive, but they do keep me occupied, and they are fun to make. Flutter and Ionic Master (LOL). I hope you all love java, and thank you for reading my "About Me" I love this community, and I am most active here, but I also have accounts on Code Review and Meta Stack Exchange. Java is a great programming language, and I would definitely recommend it to a friend! ☕️

Updated on December 18, 2022

Comments

  • Nicks
    Nicks over 1 year

    After upgrating flutter version to Flutter 1.22.0-2.0.pre.78 • channel master I am getting this warning:-

    WARNING: [Processor] Library 'C:\Users....gradle\caches\modules-2\files-2.1\io.flutter\flutter_embedding_debug\1.0.0-b1d9f863db32cb1d6714cf75db4a992ee3765113\b8748b5192a2a0961f5c14f8845331ad5f2225a1\flutter_embedding_debug-1.0.0-b1d9f863db32cb1d6714cf75db4a992ee3765113.jar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway. Example of androidX reference: 'androidx/annotation/VisibleForTesting' Example of support library reference: 'android/support/annotation/NonNull'`

    Is this issue will cause some serious issue in future or not. Thanks in Advance :)

  • Hamza Abdullah
    Hamza Abdullah over 2 years
    thank you for useful answer