Didn't find class on path: dexpathlist

后端 未结 8 1376
鱼传尺愫
鱼传尺愫 2020-12-10 03:18

Seriously, i don\'t know what to do to solve this problem. My android project was working fine, until i needed to import a library with Maven. Since that, everything starte

8条回答
  •  佛祖请我去吃肉
    2020-12-10 03:55

    I should understand the problem by just seeing "dex errors".But it took half day to fix the issue. I fix this by following android developers page's instruction: https://developer.android.com/studio/build/multidex.html

    First add this to my gradle.build:

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

    Then I extend my Application class (or declare the application class in AndroidManifest.xml or override attachBaseContext() function) as instructed by the MultiDexApplication class document on the page. This have fixed my problem.

提交回复
热议问题