Alexander Suslov
03/17/2019, 2:17 PMFAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':adsmodule:transformClassesAndResourcesWithPrepareIntermediateJarsForDebug'.
> java.lang.RuntimeException: java.util.zip.ZipException: duplicate entry: ru/subprogram/guitarsongs/ads/BannerAdFactory.class
Duplicate entry could be different after clean/rebuild.
I use IDEA Ultimate 2018.3.5, tested kotlin version 1.3.21
and 1.3.30-eap-45
.louiscad
03/17/2019, 2:41 PMAlexander Suslov
03/17/2019, 5:35 PMsvyatoslav.scherbina
03/18/2019, 8:18 AMAlexander Suslov
03/19/2019, 8:40 AMkotlin {
targets {
//...
}
sourceSets {
commonMain.dependencies {
api project(':commonmodule')
}
androidMain.dependencies {
// api project(':commonmodule') <- here, redundant line
implementation project(':sqlitex')
implementation 'com.getkeepsafe.relinker:relinker:1.2.3'
}
}
}
Why it works on my macbook - I have no idea...Alexander Suslov
03/24/2019, 12:02 PMapply plugin: 'kotlin-multiplatform'
apply plugin: 'com.android.library'
//...
kotlin {
//...
targets {
//...
fromPreset(presets.android, 'android')
}
sourceSets {
commonMain.dependencies {
implementation project(':commonmodule')
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
androidMain.dependencies {
implementation project(':sqlitex')
implementation 'com.getkeepsafe.relinker:relinker:1.2.3'
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
}
}
}
The commonmodule
is MPP too
apply plugin: 'kotlin-multiplatform'
kotlin {
targets {
//...
fromPreset(presets.jvm, 'android')
}
sourceSets {
commonMain.dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib-common'
}
androidMain.dependencies {
implementation 'org.jetbrains.kotlin:kotlin-stdlib'
}
}
}
I guess that something is wrong here... Why kotlin-stdlib
is declared in both dependencies blocks (commonMain
and androidMain
), but project(':commonmodule')
is declared only in the commonMain
block? Is everything right here?svyatoslav.scherbina
03/25/2019, 8:39 AMWhyDoes the project work properly withoutis declared in both dependencies blocks (kotlin-stdlib
andcommonMain
), butandroidMain
is declared only in theproject(':commonmodule')
block? Is everything right here?commonMain
kotlin-stdlib
dependency in androidMain { ... }
?Alexander Suslov
03/25/2019, 9:09 AMsvyatoslav.scherbina
03/25/2019, 9:12 AMAlexander Suslov
03/26/2019, 3:53 PM