Search Unity

  1. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Multiple Dex Files in default gradle output

Discussion in 'Android' started by stevencoull, Jul 21, 2017.

  1. stevencoull

    stevencoull

    Joined:
    Sep 15, 2016
    Posts:
    16
    I posted this over on Stack Overflow with no luck:
    https://stackoverflow.com/questions/45025831/multiple-dex-files-in-default-unity-gradle

    After hitting the 65k limit we need to start exporting our project and using Proguard, but I can't seem to get past the error

    Multiple dex files define Lcom/myproject/myappname/BuildConfig;
    It seems like there is a library within my project with the same bundle name as my app, probably created because we use the Assets/Plugins/Android/res folder to set our app name for different languages. If anyone has any experience with this issue I'd really appreciate some help!
     
  2. kosanao

    kosanao

    Joined:
    Apr 4, 2016
    Posts:
    1
    Bumping this, we have the same problem.
     
  3. anileapen05

    anileapen05

    Joined:
    Jun 8, 2013
    Posts:
    83
    This worked for me
    credit to: https://www.spikything.com/blog/ind...ror-with-unityads-after-upgrading-to-unity-5/

    • Close Unity Editor
    • Backup your project
    • Remove any folder or meta file called UnityAds from your project’s Assets/Libs folder
    • Remove any folder or meta file called UnityAds from your project’s Assets/Plugins/Android folder
    • Start Unity
    • Build your project for Android
    If this doesn’t work, try doing an Assets > Reimport All, then building again. Hopefully, future version of Unity will solve this problem automatically. Good luck out there!
     
unityunity