Run android project from a Flutter project with unsound null safety
Solution 1
Solution 2
After searching a little more I found the solution to this problem. You do not need to run the project through Android Studio, you can run it with the Flutter command and then attach the debugger using Android Studio.
Reference: https://stackoverflow.com/a/58760445/8633918
![Leonardo da Silva](https://i.stack.imgur.com/qBt0S.jpg?s=256&g=1)
Leonardo da Silva
Developing an online multiplayer game in Flutter called Fibula Wars.
Updated on December 28, 2022Comments
-
Leonardo da Silva over 1 year
After sound null safety has arrived, projects that still have dependencies that have not upgraded to null safety yet, can still be run using
--no-sound-null-safety
flag through the Flutter command.But now I am trying to run the app through the
android
project. The reason why I am trying to do this way is to allow me to debug a native Flutter plugin. I open the folderandroid
on Android Studio and when I try to run the project I receive an error:Error: Cannot run with sound null safety, because the following dependencies don't support null safety:
If I was running through the Flutter command, the flag I mentioned would work here. But how do I set this flag when running the
android
project through Android Studio?