无法创建MD5哈希文件? [英] Unable to create MD5 Hash file?
本文介绍了无法创建MD5哈希文件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的错误是:
错误:执行任务'失败:app:compileDebugJavaWithJavac'。
$ b
无法创建MD5哈希文件'D:\Android\AsianNEws\PNRstatus\app\libs\httpclient- 4.3.6.jar'。
我的Gradle文件是:
apply plugin:'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion25.0.2
useLibrary'org.apache.http.legacy'
defaultConfig {
applicationIdcom.example。 hp_pc.pnrstatus
minSdkVersion 21
targetSdkVersion 25
versionCode 1
versionName1.0
testInstrumentationRunnerandroid.support.test.runner.AndroidJUnitRunner
}
packagingOptions $ b $'排除'META-INF / DICENDENCIES'
排除'META-INF / NOTICE'
排除'META-INF / LICENSE'
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
$ b依赖关系{
编译fileTree(dir:'libs',include:['* .jar'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2',{
exclude group:'com.android.support',module:'support-annotations'$ b $编译文件('libs / httpcore-4.3.3.jar')
编译文件('libs / httpclient-4.3.6.jar')
编译文件/httpmime-4.3.6.jar')
//编译组:'org.apache.httpcomponents',名称:'httpclient-android',版本:'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:+'
//编译组:'org.apache.httpcomponents',名称:'httpclient-android',版本:'4.3.5.1'
testCompile'junit:junit:4.12'
}
解决方案
在我的例子中, / p>
编译文件('lib / httpclient-4.3.6.jar'),并通过更正拼写到libs
来解决
请正确检查拼写或您可以试试这个
编译文件('libs / httpclient-4.3.6.jar','libs / httpcore-4.3.3.jar','libs / httpmime-4.3.6.jar')
PS: HttpClient 已过时并且未推荐。请考虑为未来的项目 OkHttp
My error is : Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
Failed to create MD5 hash for file 'D:\Android\AsianNEws\PNRstatus\app\libs\httpclient-4.3.6.jar'.
My Gradle file is :
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. Please Consider OkHttp for future Projects
这篇关于无法创建MD5哈希文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文