简体   繁体   中英

How do I fix a Flutter for Android issue?

I'm doing an app in Android Studio, and decided to make a Flutter project since it would help me a lot, but I seem to be running into a problem that I've seen no one have. On my MainActivity in the android/app/src/main folder, I have it extend FlutterActivity but it's showing an error, not being able to find io.flutter.embedding. When I go to Project Structure, it tells me that I have an invalid item 'Flutter for Android' in the dependencies list of my 'myappname.android' module. I have downloaded the Flutter SDK and I have the project pointing there, but other than that I have no idea how to solve this problem. Any ideas? Flutter doctor diagnosis, if asked

Edit: Provided an image of the errors:

Dependency error

Library error

MainActivity error

That was entirely my bad, I had no idea I had to open both Flutter Project and the Android Module of said project on Android Studio. Everything is working great now, thanks and sorry!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM