Search Unity

  1. Check out our Unite Austin 2017 YouTube playlist to catch up on what you missed. More videos coming soon.
    Dismiss Notice
  2. Unity 2017.2 is now released.
    Dismiss Notice
  3. The Unity Gear Store is here to help you look great at your next meetup, user group or conference. With all new Unity apparel, stickers and more!
    Dismiss Notice
  4. Introducing the Unity Essentials Packs! Find out more.
    Dismiss Notice
  5. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice
  6. Unity 2017.3 beta is now available for download.
    Dismiss Notice

Cloud Build fails with gradle & FacebookSDK

Discussion in 'Unity Cloud Build' started by mrybczynski_hg, Sep 18, 2017.

  1. mrybczynski_hg


    Sep 4, 2017
    I'm building apk for Android using Gradle, because of a lot of plugins and dex errors. Locally everything works fine. Even other similar projects builds fine on Cloud Build. On my current project i get 2 errors:

    One with Facebook SDK:
    11316: [Unity] error CS1704: An assembly with the same name `Facebook.Unity.Settings' has already been imported. Consider removing one of the references or sign the assembly

    I found out this topic: but fix doesn't work. Strange thing is that it works other projects.

    Another one is about gradle:
    18241: [Unity] FAILURE: Build failed with an exception.
    18242: [Unity] * What went wrong:
    18243: [Unity] Execution failed for task ':transformClassesAndResourcesWithProguardForRelease'.
    18244: [Unity] > Please correct the above warnings first.

    18211: [Unity] Note: there were 11 duplicate class definitions.
    18212: [Unity] (
    18213: [Unity] Warning: com.appsflyer.GcmInstanceIdListener: can't find superclass or interface
    18222: [Unity] Warning: com.unity.purchasing.googleplay.GooglePlayPurchasing$6: can't find referenced class [Unity] Warning: com.unity.purchasing.googleplay.IabHelper$2$1: can't find referenced class
    18228: [Unity] Warning: com.unity.purchasing.googleplay.IabHelper$2$1: can't find referenced class
    18232: [Unity] Warning: there were 18 unresolved references to classes or interfaces.
    18233: [Unity] You may need to add missing library jars or update their versions.
    18234: [Unity] If your code works fine without the missing classes, you can suppress
    18235: [Unity] the warnings with '-dontwarn' options.

    18755: [Unity] Note: there were 3 references to unknown classes.
    18758: [Unity] Note: there were 50 unkept descriptor classes in kept class members.
    18762: [Unity] Note: there were 29 library classes explicitly being kept.
    18765: [Unity] Note: there were 17 unresolved dynamic references to classes or interfaces.
    18768: [Unity] Note: there were 1 class casts of dynamically created class instances.
    18772: [Unity] Note: there were 25 accesses to class members by means of introspection.
    18776: [Unity] Warning: Exception while processing task Please correct the above warnings first.
    18777: [Unity] :transformClassesAndResourcesWithProguardForRelease FAILED
    18778: [Unity] BUILD FAILED

    There is an issue for one of them in Issue Tracker (
    Do you have any idea how to workaround it? I have no idea how to use proguard and where should I put it's rules.
  2. liortal


    Oct 17, 2012
    Do you have Proguard enabled? probably via a custom gradle build file? it seems that it is not properly configured since the build fails due to Proguard errors (well, technically - warnings...)
  3. mrybczynski_hg


    Sep 4, 2017
    I have fixed it by using custom gradle build file with minify disabled