GeneratedPluginRegistrant.java:20: error: non-static method registerWith(Registrar) cannot be referenced from a static context
Flaccuss opened this issue · comments
Hi. This issue has been reported previously without much information. It is related to the plugin-system in Flutter being migrated due to an internal API change. (https://flutter.dev/docs/development/packages-and-plugins/plugin-api-migration)
What it means for you as the user is, (your) Flutter, while generating the plug-in files is using the older version (v1) for generating the plug-in files. I'm currently writing a fix for this, but meanwhile, you can try the following:
- Inside your
android\app\src\main
folder, open theAndroidManifest.xml
and add
<meta-data android:name="flutterEmbedding" android:value="2" />
at the end of this file, but inside the application tag (i.e. before</application>
) - If that does not help, or if that value was already existing/set to "2", you should look at migrating your code to AndroidX.
Let me know if changing the value from "1" to "2" or if migrating to AndroidX helps.
Hi, @Flaccuss I have updated the plug-in to version 1.0.6 today. You should take a look at it again & let me know if the problem still persists. I'm closing this issue for now. Thank you!