I was researching a bit about writing native code in flutter. On opening the MainActivity.kt file in android I faced these issues.
On highlighting the error it showed 'Unresolved reference: FlutterActivity'.
Can someone please help me to fix this issue ?
Thankyou in advance.
I got the solution for this.
If you want to write native code or edit existing native code you have to open the "android" part of your project specifically.
You can do that be going to : File -> Open .....
Then browse to your current project and select its "android" folder and open it :
Then click "OK".
It will open the android native part of your project. All the errors will be gone if you will open the MainActivity through this path.
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