AndroidGradle插件0.7.0:“APK打包过程中的重复文件”使用AndroidGradle插件0.7.0,如下所示build.gradle:buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.0'
}
}
apply plugin: 'android'
repositories {
maven { url "https://android-rome-feed-reader.googlecode.com/svn/maven2/releases" }
maven { url "http://dl.bintray.com/populov/maven" }
mavenCentral()
}
android {
compileSdkVersion 19
buildToolsVersion '18.1.1'
defaultConfig {
minSdkVersion 9
targetSdkVersion 19
}
buildTypes {
release {
runProguard true
proguardFile getDefaultProguardFile('proguard-android-optimize.txt')
}
}
productFlavors {
defaultFlavor {
proguardFile 'proguard-rules.txt'
}
}
sourceSets {
instrumentTest.setRoot('src/instrumentTest')
}
}
configurations {
apt
}
ext.androidAnnotationsVersion = '2.7.1';
dependencies {
compile 'com.android.support:support-v4:18.0.0'
compile 'com.viewpagerindicator:library:2.4.1@aar'
compile 'com.google.code.android-rome-feed-reader:android-rome-feed-reader:1.0.0-r2'
compile 'org.jdom:jdom:1.1.1-android-fork'
apt "com.googlecode.androidannotations:androidannotations:${androidAnnotationsVersion}"
compile "com.googlecode.androidannotations:androidannotations-api:${androidAnnotationsVersion}"
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.j256.ormlite:ormlite-android:4.47'
compile 'com.j256.ormlite:ormlite-core:4.47'
compile 'org.springframework.android:spring-android-core:1.0.1.RELEASE'
compile 'org.springframework.android:spring-android-rest-template:1.0.1.RELEASE'
compile 'com.prolificinteractive:actionbarsherlock:4.3.1@aar'
compile 'com.google.code.geocoder-java:geocoder-java:0.15'
compile files('libs/CWAC-Pager.jar')
}在我更新AndroidStudio之前,今天早上一切都很顺利。有什么想法吗?编辑:我可以通过运行以下命令临时修复它zip -d spring-android-core-1.0.1.RELEASE.jar META-INF/notice.txt直到所有重复的错误消失。
3 回答
神不在的星期二
TA贡献1963条经验 获得超6个赞
截至AndroidStudio版本0.8.14
android { packagingOptions { exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' exclude '...' } }
build.gradle
历史:
android { packagingOptions { exclude 'META-INF/LICENSE.txt' } }
文件名“LICENSE.txt”和“NOTICE.txt”区分大小写。请试用“Licse.txt”和“note e.txt”。
慕田峪7331174
TA贡献1828条经验 获得超13个赞
android { packagingOptions { exclude 'META-INF/DEPENDENCIES.txt' exclude 'META-INF/DEPENDENCIES' exclude 'META-INF/dependencies.txt' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/LICENSE' exclude 'META-INF/license.txt' exclude 'META-INF/LGPL2.1' exclude 'META-INF/NOTICE.txt' exclude 'META-INF/NOTICE' exclude 'META-INF/notice.txt' } }
肥皂起泡泡
TA贡献1829条经验 获得超6个赞
packagingOptions { exclude 'META-INF/DEPENDENCIES.txt' exclude 'META-INF/LICENSE.txt' exclude 'META-INF/NOTICE.txt' }
- 3 回答
- 0 关注
- 683 浏览
添加回答
举报
0/150
提交
取消