Android 下载前Google Play Store中的应用程序大小增加
我为Google Play Store构建了一个4MB大小的应用程序(不幸的是,仅适用于斯里兰卡),最近有报道称,一些用户无法下载该应用程序,因为该应用程序可能太大,有时会达到40到400MB大小 我试图找出导致此问题的原因,但无法在设备上复制此情况。什么因素会导致这种应用程序大小膨胀,我可以做些什么来减少这种膨胀 我曾经使用过firebase分析和崩溃报告服务,在前面的一个问题中,我被告知这可能是原因之一。这是真的吗 编辑:-这是顶级build.gradle源代码Android 下载前Google Play Store中的应用程序大小增加,android,google-play,apk,Android,Google Play,Apk,我为Google Play Store构建了一个4MB大小的应用程序(不幸的是,仅适用于斯里兰卡),最近有报道称,一些用户无法下载该应用程序,因为该应用程序可能太大,有时会达到40到400MB大小 我试图找出导致此问题的原因,但无法在设备上复制此情况。什么因素会导致这种应用程序大小膨胀,我可以做些什么来减少这种膨胀 我曾经使用过firebase分析和崩溃报告服务,在前面的一个问题中,我被告知这可能是原因之一。这是真的吗 编辑:-这是顶级build.gradle源代码 // Top-level b
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.google.gms:google-services:3.0.0'
}
}
allprojects {
repositories {
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
以下是应用程序级生成文件:-
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "observerjobs.com.testapp"
minSdkVersion 15
targetSdkVersion 24
versionCode 6
versionName "0.2.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_7
targetCompatibility JavaVersion.VERSION_1_7
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.google.firebase:firebase-core:9.8.0'
compile 'com.google.firebase:firebase-crash:9.8.0'
compile 'com.facebook.fresco:fresco:0.14.1'
compile 'com.android.support:support-v4:24.2.1'
compile 'com.android.support:support-vector-drawable:24.2.1'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-appindexing:9.8.0'
compile 'com.android.support:cardview-v7:24.0.+'
compile 'com.android.support:recyclerview-v7:24.0.+'
}
apply plugin: 'com.google.gms.google-services'
应用程序大小如何可能增加到400MB?天哪!!400 MB??检查,您过去经常从服务获取数据并连续存储到应用程序中。您可以共享应用程序的playstore url吗?这就是为什么我说“我已被报告”。我所知道的唯一一件事是,在某些设备中,应用程序的大小已报告增加,有时即使删除了大量数据也无法安装应用程序。在
build.gradle中添加shrinkResources true