我的应用程序有两种版本的口味。免费和专业。当我生成sind apks时,它们都是相同的大小。但是,当我从谷歌播放专业版下载它们是两倍大。
这是我的gradle代码。如果您需要任何其他帮助我将提供。
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
apply plugin: 'me.tatarka.retrolambda'
ext.googleSdkVersion = '10.2.1'
ext.supportLibraryVersion = '25.3.1'
android {
signingConfigs {
sign_config {
keyAlias 'somealias'
keyPassword 'somepass'
storeFile file('../somekeystore.jks')
storePassword 'somepass'
}
}
lintOptions {
disable 'MissingTranslation'
}
dexOptions {
javaMaxHeapSize "4g"
}
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
multiDexEnabled true
minSdkVersion 21
targetSdkVersion 23
versionCode 35
versionName "2.0.3"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.sign_config
}
debug {
signingConfig signingConfigs.sign_config
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
productFlavors {
free {
applicationId 'com.my.app'
}
pro {
applicationId 'com.my.apppro'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
// compile "com.android.support:design:$supportLibraryVersion"
compile "com.android.support:design:$supportLibraryVersion"
compile "com.google.firebase:firebase-core:$googleSdkVersion"
compile "com.google.firebase:firebase-crash:$googleSdkVersion"
compile "com.google.android.gms:play-services-ads:$googleSdkVersion"
compile project(':trimming_helper')
compile 'com.j256.ormlite:ormlite-core:4.48'
compile 'com.j256.ormlite:ormlite-android:4.48'
// for settings help activity
compile 'com.github.chrisbanes:PhotoView:1.3.0'
compile 'io.reactivex:rxandroid:1.2.1'
compile 'io.reactivex:rxjava:1.1.6'
compile 'com.facebook.android:facebook-android-sdk:4.18.0'
compile 'com.afollestad:drag-select-recyclerview:0.4.0'
compile 'org.greenrobot:eventbus:3.0.0'
compile 'com.ogaclejapan.smarttablayout:library:1.6.1@aar'
compile 'com.ogaclejapan.smarttablayout:utils-v4:1.6.1@aar'
testCompile 'junit:junit:4.12'
compile('com.crashlytics.sdk.android:crashlytics:2.6.7@aar') {
transitive = true;
}
compile('com.crashlytics.sdk.android:crashlytics-ndk:1.1.6@aar') {
transitive = true;
}
// pin Activity
compile 'com.github.traex.rippleeffect:ripple:1.3.1-OG'
compile 'com.github.omadahealth.typefaceview:typefaceview:1.5.0@aar' //TypefaceTextView
compile 'uk.me.lewisdeane.ldialogs:ldialogs:1.2.0@aar'
//Compat
compile "com.android.support:support-v4:$supportLibraryVersion"
compile "com.android.support:appcompat-v7:$supportLibraryVersion"
compile "com.android.support:support-v13:$supportLibraryVersion"
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.intuit.sdp:sdp-android:1.0.4'
// this for update all support version to last
compile "com.android.support:cardview-v7:$supportLibraryVersion"
compile "com.android.support:customtabs:$supportLibraryVersion"
}
apply plugin: 'com.google.gms.google-services'
crashlytics {
enableNdk true
androidNdkOut 'src/main/obj'
androidNdkLibsOut 'src/main/libs'
}
答案 0 :(得分:0)
我解决了这个问题,当我上传新的apk到google play时,有一个复选框,用于添加obb文件(文件大小为12 mb),你可以取消选中并上传apk。那就是它))感谢Azizbekian这么快的回复。