How to avoid DEX 64K LIMIT by importing the right library

后端 未结 5 779
栀梦
栀梦 2021-02-14 11:03

I had this issue where I overflow the 64k method limit in Dalvik when compiling all the library I used. I started to have this issue when I imported the Support

5条回答
  •  长发绾君心
    2021-02-14 11:49

    You can open the terminal and run command gradlew app:dependencies to test which dependencies are already included in the others as transitive dependencies for your project along with the respective versions of each.

    For example I got the following dependency chart for one of my projects for the com.android.support:design library I used:

    +--- com.android.support:design:23.3.0
    |    +--- com.android.support:appcompat-v7:23.3.0
    |    |    +--- com.android.support:support-vector-drawable:23.3.0
    |    |    |    \--- com.android.support:support-v4:23.3.0
    |    |    |         \--- com.android.support:support-annotations:23.3.0
    |    |    +--- com.android.support:animated-vector-drawable:23.3.0
    |    |    |    \--- com.android.support:support-vector-drawable:23.3.0 (*)
    |    |    \--- com.android.support:support-v4:23.3.0 (*)
    |    +--- com.android.support:support-v4:23.3.0 (*)
    |    \--- com.android.support:recyclerview-v7:23.3.0
    |         +--- com.android.support:support-v4:23.3.0 (*)
    |         \--- com.android.support:support-annotations:23.3.0
    

提交回复
热议问题