skip to Main Content

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


  1. 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.

    Login or Signup to reply.
  2. This solution has worked for me, so try this:

    1. Remove the IOS folder in the project
    2. Run "flutter create –project-name={YOUR_PROJECT_NAME} ." command in the terminal on the root path of the project
    3. Run "flutter run" command or while main.dart selected start debugging
    Login or Signup to reply.
  3. 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 file

    2 – sudo arch -x86_64 gem install ffi in the root of the file

    3 – cd ios

    4 – arch -x86_64 pod install here, you must do this step in the ios folder

    If it’s works for your project as well, then you can give an upvote for people who are faced with a problem. Thanks

    Login or Signup to reply.
  4. Based on this article, just issuing a

    flutter clean 
    

    in the project directory solved the problem for me. The build worked fine then.

    Login or Signup to reply.
  5. enter image description here

    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.

    Login or Signup to reply.
  6. Just remove DerivedData

    rm -rf ~/Library/Developer/XCode/DerivedData

    Path will be shown in error which you get in console.

    and then rebuilt it

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search