java - Android Studio編譯打包Apk出現(xiàn)錯誤
問題描述
打包Apk的時候出現(xiàn)“Build APK: Errors while building APK. You can find the errors in the ’Messages’ view.”錯誤
我的Gradle:
apply plugin: ’com.android.application’android { compileSdkVersion 25 buildToolsVersion '25.0.3' defaultConfig {applicationId 'cn.licoy.demo2'minSdkVersion 15targetSdkVersion 25versionCode 1versionName '1.0'testInstrumentationRunner 'android.support.test.runner.AndroidJUnitRunner' } buildTypes {release { shrinkResources true // -- always add this above minifyEnabled -- minifyEnabled true proguardFiles getDefaultProguardFile(’proguard-android.txt’),’proguard-rules.pro’} }}dependencies { compile fileTree(dir: ’libs’, include: [’*.jar’]) 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:25.3.1’ compile ’com.android.support:design:25.3.1’ compile ’com.android.support.constraint:constraint-layout:1.0.2’ testCompile ’junit:junit:4.12’}
問題解答
回答1:已解決,在moblie.gradle中添加
aaptOptions.cruncherEnabled = falseaaptOptions.useNewCruncher = false
相關(guān)文章:
1. docker綁定了nginx端口 外部訪問不到2. dockerfile - 為什么docker容器啟動不了?3. git - webstorm窗口中左側(cè)列表的文件名顏色怎么修改4. android權(quán)限被第三方安全軟件禁止,如何獲取該權(quán)限狀態(tài)5. javascript - 深夜被問題困擾求解惑,rn的API之PermissionsAndroidd的問題6. javascript - 最近用echarts做統(tǒng)計圖時遇到兩個問題!!7. mysql - 我的myeclipse一直連顯示數(shù)據(jù)庫連接失敗,不知道為什么8. docker images顯示的鏡像過多,狗眼被亮瞎了,怎么辦?9. tp 6.0 數(shù)據(jù)查詢,求教!10. mysqld無法關(guān)閉

網(wǎng)公網(wǎng)安備