Search Unity

Multidex Support on Android

Discussion in 'Android' started by Claytonious, May 12, 2015.

  1. Claytonious

    Claytonious

    Joined:
    Feb 16, 2009
    Posts:
    904
    Yes, a lot has changed since this thread started. Hopefully most have already switched to something more like this, but that's a good writeup to help anyone who hasn't yet, @iabhipatidar.
     
  2. lorux

    lorux

    Joined:
    Feb 9, 2017
    Posts:
    31
    It looks like you have duplicated WRITE_EXTERNAL_STORAGE permission. Look over your AndroidManifest.xml in Plugins/Android, the AndroidManifest of your .aar files (you can open them with WinRar) and subprojects under Plugins/Android that may have an AndroidManifest. I think there are more than one manifests that are declaring WRITE_EXTERNAL_STORAGE permission.. you should keep only one.
     
  3. pattadi

    pattadi

    Joined:
    Oct 23, 2016
    Posts:
    1
    Hi I have exported unity project and using it in the the android studio. The problem what I am facing is when I am trying to open Augmented reality scene from unity before exporting it is taking 3-4 sec to open but after exporting it is taking 10-15 sec to open. Can you please help me to solve this issue. Thank you
     
  4. BenoitFreslon

    BenoitFreslon

    Joined:
    Jan 16, 2013
    Posts:
    166
    Hello @iabhipatidar I would like to build my Android app but the min API is 19.
    I still got this error: > Build-in class shrinker and multidex are not supported yet.

    I just added your file core-release.aar in my Assets/Plugins/Android folder.
    I also modified the defaultConfig.gradle file:
    Code (CSharp):
    1.  
    2.  
    3. defaultConfig {
    4. multiDexEnabled true
    5. targetSdkVersion **TARGETSDKVERSION**
    6.  
    7. and
    8.  
    9. compile 'com.android.support:multidex:1.0.1'
    10.  
    11.  
    And added in the AndroidManifest.xml
    Code (CSharp):
    1. android:name="com.psycodex.core.PsycodexApplication"
     
    Last edited: May 2, 2018
  5. FranTapTapTales

    FranTapTapTales

    Joined:
    Sep 4, 2017
    Posts:
    1
    Hi,
    Did you solve the error? I'm just having the same issue with the same version (API 19). Is I set minimum api level to 21 (5.0) or higher the error dissapears, but I really need to support API 19, so I need to fix this. It's been some days with this with no progress, I'm kind of desperated..

    Thanks!
     
    demid likes this.
  6. demid

    demid

    Joined:
    Mar 20, 2012
    Posts:
    9
    Try to remove
    useProguard **PROGUARD_RELEASE**
    from gradle build template.
     
    paradizIsCool likes this.
  7. siddharth3322

    siddharth3322

    Joined:
    Nov 29, 2013
    Posts:
    1,049

    Where to find mainTemplate.gradle file? I have iMac system.