error shown in Flutter Android project folder in mainactivity
package com.malik.database_demo;
import io.flutter.embedding.android.FlutterActivity;
public class MainActivity extends FlutterActivity {
}
Currently you are probably trying to directly edit the MainActivity class from your Flutter project. (By expanding android -> Navigation to 'MainActivity.java' or 'MainActivity.kt' and editing it).
I have observed that when we try to edit the native side code this way, Flutter is not able to recognize the android part.
What you can do is open the 'android' part of your flutter project and then edit it.
To achieve this :
[1 = Your current Flutter project,2 = The android part of your flutter project]
GLHF :)
I added flutter.jar as a library. This seemed to work.
I'm not sure if there are some unintended consequences yet!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With