home_widget icon indicating copy to clipboard operation
home_widget copied to clipboard

Unresolved reference: HomeWidgetProvider

Open Tgarfr opened this issue 1 year ago • 3 comments

Problem to solve

HomeWidgetProvider is not recognized by AndroidStudio, how does it find this class?

Proposal

How to transfer the Flutter plugin to Android?

More information

No response

Which Platform would be improved?

Android

Other

  • [ ] Are you interested in working on a PR for this?

Tgarfr avatar Sep 04 '24 07:09 Tgarfr

Same here, any suggestions?

eeoom avatar Oct 17 '24 05:10 eeoom

I had the same problem after adding home_widget to flutter pubspec.yml HomeWidgetProvider wasn't resolved as any of the es.antonborri.home_widget kotlin classes.

To permit Android Studio to resolve dependencies i removed home_widget dependency, re-sync gradle, re-add dependency and sync gradle again, and it works, all es.antonborri.home_widget kotlin classes are were resolved.

NB: I have two Android studio launched, the first for flutter coding, flutter pub add/remove, with project dir opened and the second opened on android folder for kotlin coding and gradle sync

Meriemi-git avatar Oct 28 '24 22:10 Meriemi-git

Thank you @Meriemi-git I think one thing is very important:

the second opened on android folder for kotlin coding and gradle sync

when manipulating the native android files you should open android studio at the android folder of your app because Android Studio when configured as a "Flutter Dev" environment doesn't properly use all the android tools

ABausG avatar Oct 29 '24 11:10 ABausG