I faced the same error on the simulator. I solved it by closing all applications related to Android Studio, Xcode, and simulators. Then, I restarted them, and it's working fine now.