1

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

2
  • I have import io.flutter.embedding.android.FlutterActivity above my class in the MainActivity.kt file. Commented Aug 24, 2020 at 20:34
  • Yes I have it too, and it's why I described that it was also giving me an error on that import. Which I assume is because I'm missing 'Flutter for Android' in the dependencies list, but I have no idea how to fix it Commented Aug 25, 2020 at 12:31

1 Answer 1

1

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!

Sign up to request clarification or add additional context in comments.

3 Comments

How did you open both?
I did so by opening the Android Module on a new window in Android Studio, essentially having both Flutter Project and the Android Module opened in two separate instances of Android Studio
I'm using Intellij With the Android Studio and Flutter plugins. How would I go about this now?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.