Android Studio DexIndexOverflowException: method ID not in

前端 未结 8 1804
长情又很酷
长情又很酷 2020-12-04 13:56

I use Android Studio to develop an application and I face this error which I have no idea how to solve.

com.android.dex.DexIndexOverflowException: met

相关标签:
8条回答
  • 2020-12-04 14:56

    Try to enable multiDex in build.gradle:

    android {
    
        defaultConfig {
            ...
    
            // Enabling multidex support.
            multiDexEnabled true
        }
        ...
    }
    
    dependencies {
      compile 'com.android.support:multidex:1.0.0'
    }
    

    This article may helpful: DexIndexOverflowException issue after updating to latest appcompat and support library

    0 讨论(0)
  • 2020-12-04 14:59

    more than 4 months that i find this error in my projects created by myself i'm losing more than 14 projects with this thing. i'm looking to all places of stackoverflow and other and also the website official of android.developer.multidex extr..... but any method official of google android was solve my issues.

    finally i'm trying with the simple change of google play service of Ads. this's the final solution that i'm finding :

    • firstly compile witch i find the error is : compile 'com.google.android.gms:play-services:9.0.2'

    • the change is just to add "-maps" and make sure that your ads it's working perfectly ! compile 'com.google.android.gms:play-services-maps:9.0.2'

    the version 9.0.2 can let your minSdkVersion 11 working, as you know the Ads can working only with version 11 and hight !

    i'm proud to find the solution and share this simple solution to solve the issue of other persons.

    0 讨论(0)
提交回复
热议问题