我發現每張表的手錶都有一個永遠不會在6Mo下發行的apk文件。 即使它不包含任何drawable。 即使默認的錶盤項目大約是6Mo,一經公佈&簽名。Android Studio:發佈apk的錶盤大小不會超過6Mo
我認爲它是Android Studio中的一個問題,因爲在商店一些錶盤均遠遠超過6Mo下(例如:圓錶盤主題是關於1.9Mo !!)
我發現,在中間移動包的清單中,合併器添加以下行:
<activity
android:name="android.support.v7.widget.TestActivity"
android:label="RecyclerViewTestActivity" />
即使使用「tools:node =」remove「」,它仍會被添加。通過這個活動添加了一大堆我沒有使用的資源(png,values)。
的build.gradle移動包:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "fr.test"
minSdkVersion 18
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
wearApp project(':wear')
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services:7.0.0'
compile "com.google.android.support:wearable:1.1.+"
}
是否有人經歷了同樣的問題,是有一個解決方案,以避免這種情況或減少APK的大小(我錯過了一個選擇。 ..)?
請顯示您的build.gradle contant – Divers
我添加了移動build.gradle。 –
「莫」應該是什麼樣的單位? –