我發佈我的應用程序使用android studio 2.2預覽3並生成簽名的apk。但是當我上傳APK到谷歌玩我得到錯誤無法zipalign apk Android的工作室2.2
You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.
而且我試圖手動使用zipalign工具,但我得到的錯誤驗證失敗。
這裏是我的build.gradle文件
android {
compileSdkVersion 23
buildToolsVersion "23.0.3"
defaultConfig {
applicationId "blackdogs.newaomsi"
minSdkVersion 16
targetSdkVersion 23
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
zipAlignEnabled true
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}}
什麼是'zipalign -c -v 4 yourapk.apk'的oputput? – antonio
@antonio 5379164 resources.arsc(OK) 驗證失敗 –
然後你的apk不是zipaligned。你可以嘗試執行'zipalign -f -v 4 yourapk.apk yourzipalignedapk.apk'然後'zipalign -c -v 4 yourzipalignedapk.apk'嗎? – antonio