Reputation: 301
Can anyone explain to me the cause of this error? I know what is dexpath and dex class in android and how to fix this error. but don't know what is the cause of this error popping up every now and then.
This error occurs when
How I'm Fixing it:
Just remove all the dependencies and everything related to DEX Class
file from gradle and sync it and then revert back to gradle settings with all the DEX
file and dependencies added and Sync
again. VOILAAA ..
And this is really annoying. How I can avoid this issue for my other projects without going through all this gradle sync
tweak.
Upvotes: 0
Views: 423
Reputation: 572
I had the same issue with moving projects to different system. when you move your project folder just leave out the build folder and you'll not see the error next time.
The error says a lot more then just class not found exception
in the log. The path of the files/ app-parts.apk gets invalid when you move your project to a different system.
Just don't copy or just rename the old build folder to something else and open your project in AS. Build->CLEAN , BUILD->REBUILD and everything will work.
Happy Coding..
Upvotes: 1