我已经附加了我的应用程序的所有gradle依赖项(我认为这是应用程序速度变慢的原因)。
请告诉我是否可以用更具体的依赖项替换任何依赖项,或者可以一起避免它们。
我也知道我的应用程序确实由于启用了多dex支持而放慢了速度,但是我不得不启用它,因为当我禁用它时我的应用程序崩溃了。
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "24.0.1"
defaultConfig {
applicationId "com.neeraj8le.srmfoodies"
minSdkVersion 15
targetSdkVersion 25
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:25.1.1'
compile 'com.android.support:design:25.1.1'
compile 'com.android.support:support-v4:25.1.1'
compile 'com.android.support:recyclerview-v7:25.1.1'
compile 'com.android.support:cardview-v7:25.1.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.google.android.gms:play-services-maps:10.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.0-beta4'
compile 'com.android.support:multidex:1.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.google.firebase:firebase-auth:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
最佳答案
无需替换或编辑任何gradle
构建链接,在安装用户首次安装应用程序时即会加载。这在所有类型的应用程序中都在发生,例如Whatsapp,Linkedin等。因此,请不要担心。
关于android - 我的Android应用首次打开时需要很长时间才能加载,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42209136/