Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Any restriction To add dependency in gradle

I have just started Android Studio from last 1 months. Its nice to work and more functionality 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 gradle we add dependency one bye one. So my question is the Is there any restriction to add dependency in build.gradle file ?

Maximum how much we can add. If we add much dependency then will it throw error

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

Advance help would be appriciated !!

like image 913
Vishal Patel Avatar asked Nov 09 '22 01:11

Vishal Patel


1 Answers

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

Limit is building Apps with Over 65K Methods. Refer link

like image 67
RKM Avatar answered Nov 14 '22 23:11

RKM