dev village
dev village

Reputation: 73

Error: "Dex file has invalid header" during Android Studio .apk build

during my approach to build the latest version off my webview app I got an error:

Error: C:\Users\{user}\Documents\AndroidStudio\{appName}\app\build\intermediates\transforms\dexBuilder\release\104\de\mdlmlr\{appName}\R$string.dex, Dex file has invalid header

During the previous builds, this error never occurred but during the latest my pc once got stuck (whole OS) and I had to reboot it manually. Maybe this caused this error. I couldn't find any help yet... Thanks!

Upvotes: 5

Views: 2226

Answers (1)

Khaled Jubeh
Khaled Jubeh

Reputation: 61

First build->Clean project

Then build->Rebuild project

Click here to see the steps

that will work for most cases

but in case that didn't work you have to update Gradle

I clicked "update" in the below pop up and that works for me

update Gradle popup

Upvotes: 5

Related Questions