I am having difficulty importing a project written on Android Studio 1.1 into Android Studio 2.1.2. I keep getting this error whenever the gradle is building before testing
I was using CyanogenMod 12.1 and was building with libgdx when I met with the same error.
Rebuilding didn't work for me.
My phone was connected as UMS or USB mass storage to my PC when I ran the app. Just changed the USB configuration from mass storage to MTP and it fixed my problem.