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. phpstudy8.1沒(méi)集成mysql-front2. 關(guān)docker hub上有些鏡像的tag被標(biāo)記““This image has vulnerabilities””3. node.js - mongodb查找子對(duì)象的名稱(chēng)為某個(gè)值的對(duì)象的方法4. docker鏡像push報(bào)錯(cuò)5. Docker for Mac 創(chuàng)建的dnsmasq容器連不上/不工作的問(wèn)題6. javascript - 在 model里定義的 引用表模型時(shí),model為undefined。7. 運(yùn)行python程序時(shí)出現(xiàn)“應(yīng)用程序發(fā)生異?!钡膬?nèi)存錯(cuò)誤?8. javascript - QQ第三方登錄的問(wèn)題9. 利用IPMI遠(yuǎn)程安裝centos報(bào)錯(cuò)!10. html5 - datatables 加載不出來(lái)數(shù)據(jù)。

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