java - Android Studio編譯打包Apk出現(xiàn)錯(cuò)誤
問(wèn)題描述
打包Apk的時(shí)候出現(xiàn)“Build APK: Errors while building APK. You can find the errors in the ’Messages’ view.”錯(cuò)誤
我的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’}
問(wèn)題解答
回答1:已解決,在moblie.gradle中添加
aaptOptions.cruncherEnabled = falseaaptOptions.useNewCruncher = false
相關(guān)文章:
1. css - 對(duì)于類(lèi)選擇器使用的問(wèn)題2. javascript - 奇怪的Symbol的問(wèn)題3. python - 為什么在main()函數(shù)里result 會(huì)變成那樣?4. javascript - Web微信聊天輸入框解決方案5. angular.js - angular ng-class里面的引號(hào)問(wèn)題6. docker - 如何修改運(yùn)行中容器的配置7. 網(wǎng)頁(yè)爬蟲(chóng) - 用Python3的requests庫(kù)模擬登陸B(tài)ilibili總是提示驗(yàn)證碼錯(cuò)誤怎么辦?8. javascript - es6將類(lèi)數(shù)組轉(zhuǎn)化成數(shù)組的問(wèn)題9. javascript - 有沒(méi)有什么好的圖片懶加載的插件,需要包含監(jiān)聽(tīng)頁(yè)面滾動(dòng)高度,然后再加載的功能10. html - vue項(xiàng)目中用到了elementUI問(wèn)題
