I have an Android project in Android Studio 2.3.0 beta4 , which depends on the CoolLib library project .
CoolLib has its source in the jar file coolLib.jar in the libs folder. coolLib.jar contains the file {pkg} /BuildConfig.class .
When I try to create and run a project on a device / emulator in Android API-22 +, it works fine, but when I try to do the same on a device / emulator in API VERSION <22, Android Studio cannot build using an exception -
Warning: exception during processing java.io.IOException: cannot write [D: \ AndroidStudioProjects \ CoolProject \ app \ build \ intermediates \ transforms \ proguard \ debug \ jars \ 3 \ 1f \ main.jar] (Unable to read [D: \ AndroidStudioProjects \ CoolProject \ CoolLib \ build \ intermediates \ bundles \ default \ libs \ coolLib.jar (;;;;;;; **. Class)] (Duplicate zip entry [coolLib.jar: {PKG} /BuildConfig.class] )): app: transformClassesAndResourcesWithProguardForDebug FAILED
The build.gradle project contains the following versions of lib support, etc.
ext { supportLibVer = '25.1.1' playServiceVer = '10.0.1' buildToolsVer = "25.0.2" compileSdkVer = 25 targetSdkVer = 25 minSdkVer = 16 } dependencies { compile files('libs/FLurry_3.2.2.jar') compile files('libs/jxl-2.6.12.jar') compile project(':CoolLib') compile files('libs/gcm.jar') compile "com.google.android.gms:play-services-ads:$playServiceVer" compile "com.android.support:appcompat-v7:$supportLibVer" compile "com.android.support:design:$supportLibVer" compile "com.android.support:cardview-v7:$supportLibVer" compile "com.android.support:support-v13:$supportLibVer" compile 'com.github.bumptech.glide:glide:3.7.0' }
source share