0

I need help with the following error I get:

Error:Execution failed for task ':app:compileDebugJavaWithJavac'

Failed to create MD5 hash for file '/home/zapbuild/AndroidStudioProjects/DrinkFly/app/libs/commons-lang3-3.3.2-javadoc.jar'.

enter code heredependencies {
compile 'com.android.support:support-v4:21.0.3'
compile 'com.google.code.gson:gson:2.3'
compile 'com.squareup.picasso:picasso:2.4.0'
compile 'com.google.android.gms:play-services:5+'
compile files('libs/android-query-full.0.26.7.jar')
compile files('libs/card.io.jar')
compile files('libs/commons-lang3-3.3.2-javadoc.jar')
compile files('libs/commons-lang3-3.3.2.jar')
compile files('libs/crittercism_v5_0_3_sdkonly.jar')
compile files('libs/signpost-commonshttp4-1.2.1.1.jar')
compile files('libs/signpost-core-1.2.1.1.jar')
compile files('libs/signpost-jetty6-1.2.1.1.jar')
compile files('libs/twitter4j-stream-3.0.5.jar')
compile 'com.squareup.retrofit:retrofit:1.8.0'
compile 'com.squareup.okhttp:okhttp-urlconnection:2.0.0'
compile 'com.squareup.okhttp:okhttp:2.0.0'
compile files('libs/gcm.jar')
compile 'com.jakewharton:butterknife:6.1.0'
compile 'com.jakewharton.timber:timber:3.1.0'
compile files('libs/httpclient-4.3.6.jar','libs/httpcore-4.3.3.jar','libs/httpmime-4.3.6.jar')
}
Pandaiolo
  • 11,165
  • 5
  • 38
  • 70
  • It will be great if you put what you have written above in the context of your code. That would make it more clear, if you ever going to get an answer. Also, try simply searching the Internet, like this http://stackoverflow.com/questions/13152736/how-to-generate-an-md5-checksum-for-a-file-in-android. – g00dy Mar 31 '17 at 05:22

6 Answers6

2

It happens because the classes.jar file is not present in

C:\Users\'user'\ .android\build-cache\'xyz'\output\jars

Just navigate to C:\Users\'user'\ .android\build-cache and delete the 'xyz' folder, and then rebuild the project. It worked in my case.

'xyz' will be similar to c0695669ead81e6635797b952f69ee10fae82501

Swetabja Hazra
  • 664
  • 7
  • 14
1

In my case, it was Kaspersky blocking the file. You could disable your antivirus and try again. Very weird issue. It happened to me..

abelabbesnabi
  • 1,819
  • 1
  • 16
  • 21
1

Remove unused jar

Not present library link can be comminted in build.gradle folder like this

// compile files('libs/android-support-v4.jar') // compile files('libs/easyandroidanimationslibrary-v0.5.jar')

Keshav Gera
  • 10,807
  • 1
  • 75
  • 53
0

If you are a duct tape programmer (like me), desperate, have reinstalled Android Studio etc., and still have the same problem, go to C:\Users\"whateveryournameis".android\build-cache and clean it out. Then , in your project, Build->rebuild and bob's your uncle (atleast it was in my case...)

  • 3
    Please consider improving your question. This is not a reddit thing were you need to be funny. Plain simple facts, nicely formatted - that is how good answers look like. – GhostCat Sep 11 '17 at 12:29
0

I had a similar problem of unable to create MD5 file as it was unable to find classes.dex file. My problem got fixed by simply updating build tools from SDK Manager.

Click on

Tools>Android>SDK Manager>SDK Tools>Select Android SDK-Build Tools and click on Apply. After update is done restart Android Studio. This should fix the issue.

Murli
  • 524
  • 6
  • 11
0

Best and Short Answer AndroidStudio -> File -> Invalidate caches/Restart

This is happen because of old generated folder structure in android studio (conflict in folder/file names) so Invalidate caches/Restart will recreate all folders and solve the issue

Sushant Gosavi
  • 3,647
  • 3
  • 35
  • 55