Android Studio支持Multidex吗?

时间:2015-12-30 07:31:22

标签: android-studio

当我尝试将Picaso和OKHttp一起用于app / build.gradle时,这个问题就开始了。请帮我解决这个问题。提前谢谢你。

1 个答案:

答案 0 :(得分:1)

    Multidex support for **Android 5.0 and higher**
Step 1 : add MultidexEnabled true in app/build.gradle
    defaultConfig {
        ...
        minSdkVersion 14
        targetSdkVersion 21
        // Enabling multidex support.
        multiDexEnabled true
    }

**Step 2 :** 
    dependencies {
        compile 'com.android.support:multidex:1.0.0'
     }

**Step 3:** in your manifest add the MultiDexApplication class from the multidex support library to the application element.

   <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.example.android.multidex.myapplication">
    <application
        ...
        android:name="android.support.multidex.MultiDexApplication">
        ...
    </application>
</manifest>

For More details about this please refer Google Developer site:
 [Click Here][1]

I hope this help. 


  [1]: http://developer.android.com/intl/es/tools/building/multidex.html