Reputation: 1806
I moved an Android Studio project that used Gradle from D:\old\file\path
to D:\new\file\path
and now I'm getting the following error:
Installation failed with message Invalid File: D:\old\file\path\app\build\intermediates\split-apk\debug\slices\slice_8.apk
I tried uninstalling the app from my phone and still got the same error. I also tried an emulator but that didn't work either.
Upvotes: 1
Views: 1853
Reputation: 3149
Close your project. Using your system file manager, delete all .iml
files you have inside your project folder (probably this will be few files, two or three). This is the point where you instruct your A.S. to forget the older path.
Then import - not open - import your project on a brand new window of your Android Studio.
From the File
menu, use Invalidate caches and restart
. Clean Build and run again.
Upvotes: 9