I have been doing debugging on Android using my Nexus 4, however I recently encountered this error here. After doing some research on this error, it seems to be an issue wit
I found a solution that works both on a non-rooted device and on an emulator.
While you can't directly delete the data folders on a non-rooted device you can utilize the pm
command to do that:
adb shell
pm uninstall
(i.e. com.example.myapp)pm uninstall
(i.e. com.example.myapp.test) - you might receive an error if the test app wasn't installed before.It seems that for some reason when uninstalling the apps from the Android UI this doesn't work (possibly it doesn't delete the data folders) however when uninstalling via the pm
command it does work.
Tried it on a "Nexus 5" and on a "OnePlus One".