Parceler ZipException "duplicate entry"

I am creating a project that has two classes (A and B) that both inherit from BaseClass. Both classes, A and B, have @Parceler annotation. When I create it for a phone with OS ver 4.1.2 (API 16), it gives me this error:

Execution failed for task ':app:transformClassesWithJarMergingForDebug'.  
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry:  
com/example/BaseClass$$PackageHelper.class

If I build it for a phone with Nougat, there is no problem.

I read about using parcelsIndex, but Parceler does not support the version I'm using - 1.1.8.

Are there any fixes for this problem?

+4
source share
2 answers
0

, 2 .

, , , , : , x, x : compile "com.android.support:appcompat-v7:25.3.0"

gradle:

apply plugin: 'com.android.application'

android {
    ...
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')

    compile "com.company.library_x:+"
    compile "com.android.support:appcompat-v7:23.4.0"
}

, , library_x , 23.4.0, 25.3.0. , , 2 , . , library_x, , .

Fyi, : build->intermediates->exploded-aar->appcompat-v7->25.3.0->...class_of_the_error.class , .

+1

Source: https://habr.com/ru/post/1679943/


All Articles