[英]Unable to create MD5 Hash file?
My error is : Error:Execution failed for task ':app:compileDebugJavaWithJavac'. 我的错误是:错误:任务':app:compileDebugJavaWithJavac'的执行失败。
Failed to create MD5 hash for file 'D:\\Android\\AsianNEws\\PNRstatus\\app\\libs\\httpclient-4.3.6.jar'. 无法为文件'D:\\ Android \\ AsianNEws \\ PNRstatus \\ app \\ libs \\ _ httpclient-4.3.6.jar'创建MD5哈希。
My Gradle file is : 我的Gradle文件是:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.example.hp_pc.pnrstatus"
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
packagingOptions{
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile files('libs/httpclient-4.3.6.jar')
compile files('libs/httpcore-4.3.3.jar')
compile files('libs/httpmime-4.3.6.jar')
// compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.android.support:design:25.1.0'
compile 'com.android.support.constraint:constraint-layout:+'
// compile group: 'org.apache.httpcomponents' , name: 'httpclient-android' , version: '4.3.5.1'
testCompile 'junit:junit:4.12'
}
In my case, I got the same Error Because of Spell Mistake in 在我的情况下,我因为法术错误而得到同样的错误
compile files('lib/httpclient-4.3.6.jar') and solved by correcting the spelling to libs
Please Check the Spellings Correctly Or You may try this 请正确检查拼写或您可以试试这个
compile files('libs/httpclient-4.3.6.jar','libs/httpcore-4.3.3.jar','libs/httpmime-4.3.6.jar')
PS: HttpClient was Deprecated One and Not Recommended. PS: HttpClient已弃用一个而不推荐。 Please Consider OkHttp for future Projects 请考虑将OkHttp用于未来的项目
I too had the same problem.just changed libs to lib and it worked. 我也有同样的问题。只是将libs改为lib并且它有效。 Check the spells correctly. 正确检查法术。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.