Search Issue Tracker

By Design

Votes

9

Found in

2017.1.0p1

Issue ID

934734

Regression

No

[Gradle][Proguard] Build fails giving confusing error about 11 duplicate class definitions

Mobile

-

How to reproduce:
1. Open the attached project
2. Set "Android" as the current target
3. Set "Gradle" as the build option
4. In player settings > publishing settings set existing keystore (you will find it in the project ../Keystore/TestKeyStore.jks , password is Unity77)
5. Build the project

Actual result: Build fails showing an error about 11 duplicate class definitions. Which is confusing.
Expected result: Error looks same as creating Development build - only real issue is explained that there are duplicate files during packaging of APK.

Reproducible: 2017.1.0p1, 2017.2.0b4, 2017.3.0a1
Proguard was introduced in 2017.1

By Design: The 11 duplicate class definitions error is expected. In the plugin page there's a section on how to set it up to work with proguard: https://support.vungle.com/hc/en-us/articles/204463100-Advanced-Settings-Vungle-Android-SDK-v-1-0-v-4-1

If you add that configuration to the user proguard file, the warning disappears and the build succeeds.

Comments (7)

  1. cannolade

    Feb 09, 2018 10:21

    I fixed after enable multiDexEnabled parameter on Assets/Plugins/Android/mainTemplate.gradle

    defaultConfig {
    minSdkVersion 15
    targetSdkVersion **TARGETSDKVERSION**
    multiDexEnabled true
    }

  2. cannolade

    Feb 05, 2018 13:36

    Same here

  3. tersa

    Jan 30, 2018 11:36

    Same here.

  4. unitydeveloper2017

    Sep 17, 2017 09:46

    Same here

  5. berkhulagu

    Sep 15, 2017 16:02

    Same here.

  6. Mese

    Sep 15, 2017 11:53

    It is happening to me too

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.