Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move away from deprecated Support Library to AndroidX #162

Closed
vladaman opened this issue Jan 30, 2019 · 6 comments
Closed

Move away from deprecated Support Library to AndroidX #162

vladaman opened this issue Jan 30, 2019 · 6 comments

Comments

@vladaman
Copy link

Android Support Library is being deprecated and even flutter and firebase plugins requires you to migrate to AndroidX.

Currently with Flutter 1.1.8 and AndroidX migration I get following error:

/home/vlad/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-0.4.5/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java:17: error: package android.support.annotation does not exist
import android.support.annotation.NonNull;
                                 ^
/home/vlad/.pub-cache/hosted/pub.dartlang.org/flutter_local_notifications-0.4.5/android/src/main/java/com/dexterous/flutterlocalnotifications/FlutterLocalNotificationsPlugin.java:139: error: cannot find symbol
    @NonNull
     ^
  symbol:   class NonNull
  location: class FlutterLocalNotificationsPlugin
2 errors
@MaikuB
Copy link
Owner

MaikuB commented Jan 30, 2019

Thanks, I'm aware of this but there were open issues around migrating to AndroidX that from what I've seen, have only been recently resolved

@jeffscaturro-aka
Copy link
Contributor

@MaikuB, given those are now resolved, do you have any more hesitation in migrating? If not, are you currently working on a branch with support for AndroidX? We have a flutter app that we're releasing shortly and were planning on migrating to X. Tonight I was going to look into what it would take to get this plugin migrated, but I haven't been following AndroidX much.

@MaikuB
Copy link
Owner

MaikuB commented Jan 30, 2019

I don't know if migration will break devs on stable, which is what I use and would imagine most are devs are on. I believe additional effort is required on devs to migrate their apps to Android and is supposedly covered in

https://developer.android.com/jetpack/androidx/migrate

Based on what I've seen/read (flutter/flutter#27106 and https://github.com/flutter/flutter/wiki/Postmortem:-AndroidX-plugin-migration), the tooling on stable hasn't been updated so that new apps support AndroidX i.e. any time an app is created on stable, devs need follow that guide to migrate.

Currently got no branch to migrate the plugin but I believe the migration process for the plugin should be straightforward

@jeffscaturro-aka
Copy link
Contributor

@MaikuB I opened a PR with my branch that I have (using to build). I haven't done much testing yet but it allows me to build the apk. I will let you know my results. Feel free to leave that PR open until you're comfortable with merging it, I just didn't want it to get lost or the work to get needlessly duped.

@MaikuB
Copy link
Owner

MaikuB commented Jan 31, 2019

Thanks I'll also do some testing as well when I get a chance to, particularly on a new app by calling flutter create ... on the stable channel though I imagine you'll also test that

@MaikuB
Copy link
Owner

MaikuB commented Jan 31, 2019

Have migrated to AndroidX in version 0.5.0 so will close this. Thanks again @JeffScaturro for the PR :)

@MaikuB MaikuB closed this as completed Jan 31, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants