Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Conversation

@mklim
Copy link
Contributor

@mklim mklim commented Jan 24, 2019

The original Android support libraries have been deprecated in favor of
AndroidX. This migration shouldn't affect behavior in a user noticeable
way, but does require plugin users to also migrate their app. See
migrating to AndroidX.

Fixes flutter/flutter#23995.

The original Android support libraries have been deprecated in favor of
AndroidX. This migration shouldn't affect behavior in a user noticeable
way, but does require plugin users to also migrate their app. See
[migrating to AndroidX](https://developer.android.com/jetpack/androidx/migrate).
@mklim mklim changed the title Migrate more plugins to AndroidX Migrate remaining plugins to AndroidX Jan 25, 2019
@mklim mklim requested review from amirh and dnfield January 25, 2019 02:08
@dnfield
Copy link
Contributor

dnfield commented Jan 25, 2019

LGTM

@mklim mklim merged commit 94f432f into flutter:master Jan 25, 2019
@mklim mklim deleted the androidx_2 branch January 25, 2019 17:44
@Botanium
Copy link

After this PR, I am getting this new error.
https://pastebin.com/ACejqYNR

error: cannot find symbol
import androidx.annotation.Nullable;

bbedward added a commit to bbedward/plugins that referenced this pull request Jan 28, 2019
@mklim
Copy link
Contributor Author

mklim commented Jan 29, 2019

Thanks for the heads up @Botanium. The root cause of this error message is because this PR introduces a breaking change to the plugins. The plugins were updated from the deprecated Android support libraries to AndroidX (flutter/flutter#23995). Unfortunately this update also requires a manual migration in apps using the plugins in cases where the apps are relying on the original support libraries and/or aren't compiling to SDK 28 already. From the pastebin error, it looks like you'll need to migrate your app to use AndroidX too to keep using the latest major versions of all the plugins.

(This PR also had a bug where semantic versioning wasn't incremented correctly in the plugins that were already >= 1.0.0, so pub was incorrectly treating this as if it wasn't a breaking change in some cases. That's been fixed now, so if you've been pinning your app to the latest major version to avoid breaking changes like this you should get the latest revert from pub and shouldn't be seeing the error anymore.)

The gradle error is not helpful here so unfortunately this is really hard to debug when it is breaking. We already have a bug on improving our error handling for Gradle (flutter/flutter#14818), but I noted on it that fixing our error handling would help this case too.

If you want to keep using the latest major versions of the plugins, the official Android migration guide for AndroidX is here. Android Studio provides an automated migration tool for apps that will probably make migrating easiest (also described on that page). You can import a flutter app into AS by hitting "Open an existing android studio project" on the IDE's opening splash screen and then opening <my_app_root>/android/build.gradle.

If you don't want to migrate your app off of the deprecated support libraries, then for now you can avoid this by staying pinned to the last major version and avoiding this change.

andreidiaconu pushed a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
The original Android support libraries have been deprecated in favor of
AndroidX. This migration shouldn't affect behavior in a user noticeable
way, but does require plugin users to also migrate their app. See
[migrating to AndroidX](https://developer.android.com/jetpack/androidx/migrate).

Fixes flutter/flutter#23995.
andreidiaconu added a commit to andreidiaconu/plugins that referenced this pull request Feb 17, 2019
julianscheel pushed a commit to jusst-engineering/plugins that referenced this pull request Mar 11, 2020
The original Android support libraries have been deprecated in favor of
AndroidX. This migration shouldn't affect behavior in a user noticeable
way, but does require plugin users to also migrate their app. See
[migrating to AndroidX](https://developer.android.com/jetpack/androidx/migrate).

Fixes flutter/flutter#23995.
Akachu pushed a commit to Akachu/flutter_camera that referenced this pull request Apr 27, 2020
The original Android support libraries have been deprecated in favor of
AndroidX. This migration shouldn't affect behavior in a user noticeable
way, but does require plugin users to also migrate their app. See
[migrating to AndroidX](https://developer.android.com/jetpack/androidx/migrate).

Fixes flutter/flutter#23995.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants