在这篇文章中,我们将为您详细介绍AndroidStudio1.5.1在APKMETA-INF/NOTICE.txt中复制的重复文件commons-codec-1.9.jar…?的内容。此外,我们还会涉
在这篇文章中,我们将为您详细介绍Android Studio 1.5.1在APK META-INF / NOTICE.txt中复制的重复文件commons-codec-1.9.jar …?的内容。此外,我们还会涉及一些关于android Conflict with dependency 'com.android.support:support-annotations' in project ':app'.、Android gradle build:在APK LICENSE.txt打包期间重复文件、Android Gradle在APK META-INF中复制的重复文件、Android Studio 0.4在APK META-INF / LICENSE.txt中复制的重复文件的知识,以帮助您更全面地了解这个主题。
本文目录一览:- Android Studio 1.5.1在APK META-INF / NOTICE.txt中复制的重复文件commons-codec-1.9.jar …?
- android Conflict with dependency 'com.android.support:support-annotations' in project ':app'.
- Android gradle build:在APK LICENSE.txt打包期间重复文件
- Android Gradle在APK META-INF中复制的重复文件
- Android Studio 0.4在APK META-INF / LICENSE.txt中复制的重复文件
Android Studio 1.5.1在APK META-INF / NOTICE.txt中复制的重复文件commons-codec-1.9.jar …?
commons-codec-1.9.jar …复制在APK meta-inf / NOTICE.txt中复制的文件
> Error:Execution Failed for task > '':app:transformResourcesWithMergeJavaResForDebug''. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files > copied in APK meta-inf/NOTICE.txt File1: > C:Usersnandkishor.mewaraAndroidStudioProjectsNew folder > (2)CityRetailsapplibscommons-logging-1.2.jar File2: > C:Usersnandkishor.mewaraAndroidStudioProjectsNew folder > (2)CityRetailsapplibscommons-codec-1.9.jar
Android工作室在Linux PC上更快吗?
我可以在VMWare内的Linux上使用HAXM吗?
人行横道包装失败***错误:build筑ABI''armeabi-v7a''失败
在Android平板电脑上的Eclipse?
USB驱动程序华硕Nexus 7的Windows 7
在project / app / libs下载并粘贴''org.apache.http.legacy.jar''文件
并在“build.gradle”中添加依赖关系
如果你在Gradle中的依赖关系中有下面的行,那么不要在你的项目中添加任何其他的行来添加jar文件。
compile filetree(dir: ''libs'',include: [''*.jar'']) testCompile ''junit:junit:4.12''
不需要导入任何commons-logging-1.2.jar文件
总结
以上是小编为你收集整理的Android Studio 1.5.1在APK META-INF / NOTICE.txt中复制的重复文件commons-codec-1.9.jar …?全部内容。
如果觉得小编网站内容还不错,欢迎将小编网站推荐给好友。
android Conflict with dependency 'com.android.support:support-annotations' in project ':app'.
如题所示 只是新建了一个项目就报这个错了。
问题 以后解决了如下:
这样就可以了。但是原因了我还是不知道。我也没有修改或者升级什么东西。。知道原因的大佬请告知一下。
转载自:https://blog.csdn.net/qq_33313551/article/details/80240332
Android gradle build:在APK LICENSE.txt打包期间重复文件
buildscript { repositories { mavenCentral() } dependencies { classpath 'com.android.tools.build:gradle:0.4.2' } apply plugin: 'android-library' repositories { mavenCentral() } dependencies { instrumentTestCompile "junit:junit:4.+" } android { compileSdkVersion 17 buildToolsversion "17.0.0" instrumentTest.setRoot('tests') instrumentTest { java.srcDirs = ['tests/src'] res.srcDirs = ['tests/res'] assets.srcDirs = ['tests/assets'] resources.srcDirs = ['tests/src'] } } }
运行时我收到以下错误:
Error: duplicate files during packaging of APK … Path in archive: LICENSE.txt
Origin 1: ….gradle/caches/artifacts-24/filestore/junit/junit/4.11/jar/4e031bb61df09069aeb2bffb4019e7a5034a4ee0/junit-4.11.jar
Origin 2: ….gradle/caches/artifacts-24/filestore/org.hamcrest/hamcrest-core/1.3/jar/42a25dc3219429f0e5d060061f71acb49bf010a0/hamcrest-core-1.3.jar
:packageTest FailedFAILURE: Build Failed with an exception.
- What went wrong:
Execution Failed for task ‘:packageTest’.
Duplicate files at the same path inside the APK: LICENSE.txt
解决方法
只需将依赖项更改为:
instrumentTestCompile “junit:junit:4.5+”
基本问题仍然存在 – android在其构建树中不接受两个相同的文件名.不过,这是一个很好的解决方法.
Android Gradle在APK META-INF中复制的重复文件
我尝试在我的Android应用程序中添加spring但应用程序不运行.
我真的不知道为什么我的跑步失败了.你能帮我解决这个问题,谢谢
这是我的app / build.gradle配置:
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsversion "23.0.3"
defaultConfig {
applicationId "com.nizar.abdelhedi.accesscontrol"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
resValue "string", "host_name", "access-control-web/rest/roles/attendance"
}
}
configurations {
all*.exclude module: 'httpclient'
all*.exclude module: 'commons-logging'
}
packagingOptions {
exclude 'meta-inf/DEPENDENCIES.txt'
exclude 'meta-inf/LICENSE.txt'
exclude 'meta-inf/NOTICE.txt'
exclude 'meta-inf/NOTICE'
exclude 'meta-inf/LICENSE'
exclude 'meta-inf/DEPENDENCIES'
exclude 'meta-inf/notice.txt'
exclude 'meta-inf/license.txt'
exclude 'meta-inf/dependencies.txt'
exclude 'meta-inf/LGPL2.1'
}
dependencies {
compile filetree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.github.vajro:MaterialDesignLibrary:1.6'
compile 'com.github.blackfizz:eazegraph:1.2.2@aar'
compile 'com.nineoldandroids:library:2.4.0'
compile 'com.github.lecho:hellocharts-library:1.5.8@aar'
compile 'org.springframework:spring-context:4.2.7.RELEASE'
}
}
这是我的错误消息
information:Gradle tasks [:app:assembleDebug] :app:preBuild UP-TO-DATE :app:preDebugBuild UP-TO-DATE :app:checkDebugManifest :app:preReleaseBuild UP-TO-DATE :app:prepareComAndroidSupportAnimatedVectorDrawable2340Library UP-TO-DATE :app:prepareComAndroidSupportAppcompatV72340Library UP-TO-DATE :app:prepareComAndroidSupportDesign2340Library UP-TO-DATE :app:prepareComAndroidSupportRecyclerviewV72340Library UP-TO-DATE :app:prepareComAndroidSupportSupportV42340Library UP-TO-DATE :app:prepareComAndroidSupportSupportVectorDrawable2340Library UP-TO-DATE :app:prepareComGithubBlackfizzEazegraph122Library UP-TO-DATE :app:prepareComGithubLechoHellochartsLibrary158Library UP-TO-DATE :app:prepareComGithubVajroMaterialDesignLibrary16Library UP-TO-DATE :app:prepareDebugDependencies :app:compileDebugAidl UP-TO-DATE :app:compileDebugRenderscript UP-TO-DATE :app:generateDebugBuildConfig UP-TO-DATE :app:mergeDebugShaders UP-TO-DATE :app:compileDebugShaders UP-TO-DATE :app:generateDebugAssets UP-TO-DATE :app:mergeDebugAssets UP-TO-DATE :app:generateDebugResValues UP-TO-DATE :app:generateDebugResources UP-TO-DATE :app:mergeDebugResources UP-TO-DATE :app:processDebugManifest :app:processDebugResources :app:generateDebugSources :app:incrementalDebugJavaCompilationSafeguard UP-TO-DATE :app:compileDebugJavaWithJavac UP-TO-DATE :app:compileDebugNdk UP-TO-DATE :app:compileDebugSources UP-TO-DATE :app:buildInfoDebugLoader :app:transformClassesWithExtractJarsForDebug UP-TO-DATE :app:transformClassesWithInstantRunVerifierForDebug UP-TO-DATE :app:transformClassesWithJavaResourcesverifierForDebug UP-TO-DATE :app:mergeDebugJniLibFolders UP-TO-DATE :app:transformNative_libsWithMergeJniLibsForDebug UP-TO-DATE :app:processDebugJavaRes UP-TO-DATE :app:transformResourcesWithMergeJavaResForDebug Failed Error:Execution Failed for task ':app:transformResourcesWithMergeJavaResForDebug'. > com.android.build.api.transform.TransformException: com.android.builder.packaging.DuplicateFileException: Duplicate files copied in APK meta-inf/spring.schemas File1: C:\Users\abdelhedi\.gradle\caches\modules-2\files-2.1\org.springframework\spring-context\4.2.7.RELEASE\289f2906943827d37de89240dbac8fe4b315a838\spring-context-4.2.7.RELEASE.jar File2: C:\Users\abdelhedi\.gradle\caches\modules-2\files-2.1\org.springframework\spring-aop\4.2.7.RELEASE\bd65f97ba61fd3dcc0b74765d3fa388aeb388aa7\spring-aop-4.2.7.RELEASE.jar File3: C:\Users\abdelhedi\.gradle\caches\modules-2\files-2.1\org.springframework\spring-beans\4.2.7.RELEASE\ae0501728c0ee072e25cb5e11b63b883c0786b4b\spring-beans-4.2.7.RELEASE.jar information:BUILD Failed information:Total time: 2.634 secs information:1 error information:0 warnings information:See complete output in console
解决方法:
添加另一个到您的packagingOptions
exclude 'meta-inf/spring.schemas'
编辑:keeeeep加入它!看起来你有一大堆重复
每当您看到Exception时:在APK BLAH / blah.blah中复制的重复文件
添加另一个排除’BLAH / blah.blah’
Android Studio 0.4在APK META-INF / LICENSE.txt中复制的重复文件
将Studio从0.3.7更新到0.4.0后,无法编译项目。我找到了一个解决方案:复制了重复的文件(Android Studio 0.4.0)
我将项目更新为gradle0.7。+,但是我不知道接下来的字符串应该放在哪里:
android { packagingOptions { exclude ''META-INF/LICENSE.txt'' }}
我的logcat:日志
Execution failed for task '':Prog:packageDebug''.> Duplicate files copied in APK META-INF/LICENSE.txt File 1: /home/scijoker/AndroidStudioProjects/ProgProject/Prog/libs/httpclient-4.1.1.jar File 2: /home/scijoker/AndroidStudioProjects/ProgProject/Prog/libs/httpclient-4.1.1.jar
PS开发在Ubuntu 13.04中
答案1
小编典典将依赖项放在顶部,将packageOptions
放在末尾对我有用。
apply plugin: ''android''.
这是我在app文件夹中的完整build.gradle
。
dependencies { compile ''com.android.support:support-v4:+'' compile files(''libs/apache-mime4j-0.6.jar'') compile files(''libs/httpmime-4.0.jar'')}android { compileSdkVersion 19 buildToolsVersion "19.0.1" defaultConfig { minSdkVersion 7 targetSdkVersion 10 versionCode 1 versionName "1.0" } buildTypes { release { runProguard false proguardFiles getDefaultProguardFile(''proguard-android.txt''), ''proguard- rules.txt'' } packagingOptions { exclude ''META-INF/DEPENDENCIES.txt'' exclude ''META-INF/LICENSE.txt'' exclude ''META-INF/NOTICE.txt'' exclude ''META-INF/NOTICE'' exclude ''META-INF/LICENSE'' exclude ''META-INF/DEPENDENCIES'' exclude ''META-INF/notice.txt'' exclude ''META-INF/license.txt'' exclude ''META-INF/dependencies.txt'' exclude ''META-INF/LGPL2.1'' }}
编辑:几乎所有的OS许可证都包含将“包含许可证副本”添加到您的项目中的义务。因此,这意味着您必须在项目中包括使用的所有OS许可证的副本。通过将它们“排除”在gradle中,就违反了许可证。
从项目中排除它们可能不是最佳选择。谢谢RS的信息。
今天的关于Android Studio 1.5.1在APK META-INF / NOTICE.txt中复制的重复文件commons-codec-1.9.jar …?的分享已经结束,谢谢您的关注,如果想了解更多关于android Conflict with dependency 'com.android.support:support-annotations' in project ':app'.、Android gradle build:在APK LICENSE.txt打包期间重复文件、Android Gradle在APK META-INF中复制的重复文件、Android Studio 0.4在APK META-INF / LICENSE.txt中复制的重复文件的相关知识,请在本站进行查询。
本文标签: