【问题标题】:Android Studio - Unable to create MD5 Hash file?Android Studio - 无法创建 MD5 哈希文件?
【发布时间】:2017-03-30 13:48:10
【问题描述】:

我遇到以下错误需要帮助:

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

无法为文件“/home/zapbuild/AndroidStudioProjects/DrinkFly/app/libs/commons-lang3-3.3.2-javadoc.jar”创建 MD5 哈希。

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')
}

【问题讨论】:

  • 如果您将上面写的内容放在代码的上下文中,那就太好了。如果你能得到答案,那会更清楚。另外,尝试简单地搜索互联网,例如stackoverflow.com/questions/13152736/…

标签: android


【解决方案1】:

发生这种情况是因为 classes.jar 文件不存在于

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

只需导航到 C:\Users\'user'\ .android\build-cache 并删除 'xyz' 文件夹,然后重建项目。它在我的情况下有效。

'xyz' 将类似于 c0695669ead81e6635797b952f69ee10fae82501

【讨论】:

    【解决方案2】:

    就我而言,是卡巴斯基阻止了该文件。您可以禁用防病毒软件,然后重试。很奇怪的问题。它发生在我身上..

    【讨论】:

      【解决方案3】:

      删除未使用的 jar

      不存在的库链接可以像这样在 build.gradle 文件夹中提交

      // 编译文件('libs/android-support-v4.jar') // 编译文件('libs/easyandroidanimationslibrary-v0.5.jar')

      【讨论】:

        【解决方案4】:

        如果你是一个胶带程序员(像我一样),绝望,已经重新安装了 Android Studio 等,但仍然有同样的问题,去 C:\Users\"whateveryournameis".android\build-cache 并清理它出去。然后,在你的项目中,Build->rebuild 和 bob 是你的叔叔(至少在我的情况下......)

        【讨论】:

        • 请考虑改进您的问题。如果您需要有趣,这不是reddit的事情。简单明了的事实,良好的格式 - 这就是好的答案的样子。
        【解决方案5】:

        我遇到了类似的问题,无法创建 MD5 文件,因为它无法找到 classes.dex 文件。通过简单地从 SDK Manager 更新构建工具,我的问题得到了解决。

        点击

        Tools>Android>SDK Manager>SDK Tools>选择Android SDK-Build Tools并点击Apply。更新完成后重启 Android Studio。这应该可以解决问题。

        【讨论】:

          【解决方案6】:

          最佳简短答案 AndroidStudio -> 文件 -> 使缓存无效/重新启动

          这是因为 android studio 中生成的旧文件夹结构(文件夹/文件名冲突)所以 使缓存无效/重新启动 将重新创建所有文件夹并解决问题

          【讨论】:

            猜你喜欢
            • 1970-01-01
            • 1970-01-01
            • 2017-07-26
            • 2021-10-10
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 1970-01-01
            • 2017-05-04
            相关资源
            最近更新 更多