Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Exception while doing past iteration backup: Source

I am working on Android project. I connected my phone to Android Studio in order to test the app. After second upload Gradle Build failed and gave this error:

Error:Execution failed for task ':app:buildInfoDebugLoader'.

Exception while doing past iteration backup : Source /home/ziyaddin/AndroidStudioProjects/Test/app/build/intermediates/builds/debug/19181584762318/classes.dex and destination /home/ziyaddin/AndroidStudioProjects/Test/app/build/intermediates/builds/debug/19181584762318/classes.dex must be different

What can be the reason for that? How to solve this problem?

like image 941
Ziyaddin Sadigov Avatar asked Apr 09 '16 10:04

Ziyaddin Sadigov


3 Answers

I solved this issue by Build -> Rebuild Project and then Run again.

Also I think newly added menu Run -> Clean and Rerun should also fix this issue.
[EDIT:] Clean and Rerun is removed in Android Studio 2.3

like image 138
sohailehmad Avatar answered Nov 08 '22 23:11

sohailehmad


I also encountered same issue, it solved by rebuilding the project.

Build-> Rebuild Project

and then

Run

I think this is only occuring on new Android Studio update from 2.0.

like image 9
Gurvinder Singh Avatar answered Nov 08 '22 22:11

Gurvinder Singh


I have this problem and solved by removing all directory (or only one) from directory ../app/build/intermediates/builds/debug/.

in this example: /home/ziyaddin/AndroidStudioProjects/Test/app/build/intermediates/builds/debug/19181584762318

like image 9
igor Avatar answered Nov 08 '22 23:11

igor