Please check to see whether the debuggable true parameter is present in your app/build.gradle file. Adding it and rebuilding your app to device should resolved the issue:
app/build.gradle:
android {
buildTypes {
debug {
// Check if you have this parameter enabled.
// Add if missing and rebuild your app.
debuggable true
}
}
}
If that’s already there, then disable the USB debugging in the Developer Options and enable it back, hopefully it does the trick.
Otherwise, if you are using other IDEs, for example IntelliJ, they could be interfering with ADB. Try to disable the Android plugin in IntelliJ and see if it solves the issue.
Also, try the following: in Android Studio - Go to file - Invalid Caches… - Click on ‘Invalidate and Restart’