Trying to run the app on my two iOS devices by doing flutter run -d all
. However, I am getting database is locked Possibly there are two concurrent builds running in the same filesystem location.
error.
What have I tried
flutter clean
flutter run
separately- running the app on iPad on the terminal & on iPhone on xCode works
So, it looks like I am having a problem to run Flutter app on my two iOS devices at the same time.
Is there any solution for this?
6
Answers
You can run the app in the release mod by using flutter run –release on multiple ios devices. Tested and worked inside the android studio.
This solution has worked for me, so try this:
I have MacBook Pro M1, and I solved this problem as follows:
I tried flutter create –projectname… etc and it did not work (you can see above this answer). I also glanced all of the topics, but they also did not work. So, you need to do these steps:
before doing these steps, in the terminal:
pod install
pod repo update
then:
1 – delete
Podfile.lock
file2 –
sudo arch -x86_64 gem install ffi
in the root of the file3 –
cd ios
4 –
arch -x86_64 pod install
here, you must do this step in the ios folderIf it’s works for your project as well, then you can give an upvote for people who are faced with a problem. Thanks
Based on this article, just issuing a
in the project directory solved the problem for me. The build worked fine then.
What worked for me was to simply follow the hint from @NDeveloper (https://developer.apple.com/forums/thread/691359?login=true). Just delete and readd my iOS emulator from the device management in Xcode.
Just remove DerivedData
rm -rf ~/Library/Developer/XCode/DerivedData
Path will be shown in error which you get in console.
and then rebuilt it