You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think the issue is the generated Flutter build.gradle doesn't match the packages used by the generated files.
Flutter.java and FlutterFragment.java use android.arch.lifecycle components and the android.support.annotation package.
The generated build.gradle file does not import the correct packages.
Hmm, it seems that sometimes the files get regenerated and overwritten. The only way to continue working is to save a backup and apply the changes everytime the generated files get overwritten.
Closing to open a new ticket later requesting update to AndroidX or a way to match the generated files with the version the project is using or not overwrite generated files at all.
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
rayliverified commentedon Sep 20, 2018
So the package imports aren't found because the Android project uses AndroidX.
rayliverified commentedon Sep 20, 2018
Manually changing the imports to
Let the project successfully compile.
Is it safe to do this given the files say to not edit them?
rayliverified commentedon Sep 21, 2018
Hmm, it seems that sometimes the files get regenerated and overwritten. The only way to continue working is to save a backup and apply the changes everytime the generated files get overwritten.
rayliverified commentedon Sep 21, 2018
Closing to open a new ticket later requesting update to AndroidX or a way to match the generated files with the version the project is using or not overwrite generated files at all.
github-actions commentedon Sep 2, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.