close
問題1: Generating unsigned, released Apk with Android Studio
Android Studio 如何產生 unsigned released Apk?
編輯 build.gradle 加上一行
signingConfig
... defaultConfig { applicationId "com.example.androidservice" minSdkVersion 8 targetSdkVersion 16 signingConfig } ... buildTypes { release { minifyEnabled false proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt' signingConfig } } ...
問題2: Error converting bytecode to dex
Error:Error converting bytecode to dex:
Cause: com.android.dex.DexIndexOverflowException: Cannot merge new index 66099 into a non-jumbo instruction!
編輯 build.gradle 加入下述紅字的部分.
android {
compileSdkVersion 17
buildToolsVersion "24.0.2"
defaultConfig {
applicationId "com.example.androidservice"
minSdkVersion 8
targetSdkVersion 16
signingConfig
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.txt'
signingConfig
}
}
dexOptions {
jumboMode = true
javaMaxHeapSize "4g"
}
}
修改好了記得 Android Studio (ATL+T)
tools > Android > Sync Project with Gradle Files
如果你覺得這篇文章對你有幫助, 請於留言板留個言, 以茲鼓勵. 謝謝! Email: jasonc@mail2000.com.tw
文章標籤
全站熱搜
留言列表