build配置:
```apply plugin: 'com.android.application'
apply plugin: 'com.jakewharton.butterknife'
android {
compileSdkVersion 29
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "com.yuyao.sl.tsyw"
minSdkVersion 23
targetSdkVersion 28
}
buildTypes {
release {
minifyEnabled false
proguardFiles 'proguard-rules.txt'
}
/*debug {
//控制debug模式下是否混淆了。
minifyEnabled false
proguardFiles 'proguard-rules.txt'
}*/
}
packagingOptions {
exclude 'META-INF/androidx.localbroadcastmanager_localbroadcastmanager.version'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/NOTICE'
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE.txt'
exclude 'META-INF/NOTICE.txt'
}
useLibrary 'org.apache.http.legacy'
compileOptions {
sourceCompatibility 1.8
targetCompatibility 1.8
}
}
dependencies {
implementation project(':library')
implementation project(':androidBootstrap')
//noinspection GradleCompatible
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
implementation files('libs/android-anyc-http.jar')
implementation files('libs/guice-3.0-no_aop.jar')
implementation files('libs/javax.inject.jar')
implementation files('libs/roboguice.jar')
implementation files('libs/xUtils-2.6.14.jar')
implementation 'com.google.android.gms:play-services-appindexing:9.8.0'
implementation files('libs/sun.misc.BASE64Decoder.jar')
implementation files('libs/universal-image-loader-1.9.3-SNAPSHOT.jar')
implementation 'com.jakewharton:butterknife:10.2.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.1'
// 'com.jakewharton:butterknife:7.0.1'
implementation files('libs/commons-logging-1.2.jar')
implementation files('libs/httpclient-4.5.2.jar')
implementation files('libs/httpcore-4.4.4.jar')
implementation project(path: ':actionbarsherlock')
}
错误提示:
```Entry name 'META-INF/androidx.legacy_legacy-support-core-utils.version' collided
就是打完包之后报错,clean --rebuild项目之后又能正常编译 。