Any restriction To add dependency to gradle

I just started Android Studioin the last 1 month. Its nice to work and work with gradle.

But I have one question.

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    compile 'com.android.support:appcompat-v7:22.2.0'
    compile 'com.android.support:cardview-v7:22.0.0'
    compile 'com.android.support:design:22.2.0'
    compile 'com.android.support:recyclerview-v7:+'
    compile 'com.google.android.gms:play-services:+'


    compile files('libs/gcm.jar')
}

In App gradlewe add the dependency one by one. So my question is: is there a restriction on adding dependencies in a file build.gradle?

As much as we can add. If we add a lot of dependencies, this will cause an error

Conversion to Dalvik format failed:
Unable to execute dex: method ID not in [0, 0xffff]: 65536

Advanced help will be assigned!

+4
source share
2 answers

build.gradle We can add any number of dependencies. There is no such limit.

Limit 65K .

+1

, .

http://developer.android.com/training/articles/memory.html http://developer.android.com/tools/building/multidex.html

, .

, , , Android. :

Conversion to Dalvik format failed:
Unable to execute dex: method ID not in [0, 0xffff]: 65536

multidex

0

Source: https://habr.com/ru/post/1617244/


All Articles