Currently I\'m using Android Studio 2.0 and installing my APK into my Samsung device (S6). However, when rebuilding my code and running it again I receive the following erro
Clean the project and in File option of Android Studio press Invalidate Caches/ Restart. Disable Instant Run and do a gradle sync. This worked for me. I am using Mac, I think this will be similar in Windows and Ubuntu.
This is session related issue. Restart studio and avoid pulling cable during instant run for future repeat of this problem.
I found this solution that works for me (AndroidStudio 2.1.3, Android 6.0.1). With the Android app running, without closing it on the connected device (smartphone/tablet), do the following steps:
For me this solution works.
I updated Android Studio to 2.2.3 and Gradle to 2.14.1 and it worked.