Cannot Connect a Phone While It Is Being Used by Another App

How to solve the problem?

If connection to the MTP device failed because it is being used by another app at the moment, you’ll be able to detect this in the device’s status:

Connect phone while used by another app
Connect phone while used by another app

You can either stop running the conflicting software or disable working with MTP devices in its preferences. Alternatively, you can try mounting the device using ADB.