Reputation: 101
I am developing an Android app and have been running it on a phone for a while. Randomly I got this error:
Execution failed for task ':app:buildInfoGeneratorDebug'.
> No current or previous main artifacts. This should not happen.
I have tried clearing .gradle caches, Invalidate Caches / Restart to no avail.
Upvotes: 2
Views: 2328
Reputation: 984
what i do is just clean the project and rebuild it again, you can find it on Build -> Clean Project. Then wait it until finish, after finish you can continue to Rebuild the project on Build -> Rebuild Project
Upvotes: 0
Reputation: 8003
This is just a random issue... Restart or Clean Project works always...
Upvotes: 1
Reputation: 101
It worked after running the app on a virtual device then re-running it on the physical device. Weird bug.
Upvotes: 3