java - Android Studio編譯打包Apk出現(xiàn)錯(cuò)誤
問題描述
打包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’}
問題解答
回答1:已解決,在moblie.gradle中添加
aaptOptions.cruncherEnabled = falseaaptOptions.useNewCruncher = false
相關(guān)文章:
1. docker-compose中volumes的問題2. 關(guān)docker hub上有些鏡像的tag被標(biāo)記““This image has vulnerabilities””3. boot2docker無法啟動(dòng)4. nignx - docker內(nèi)nginx 80端口被占用5. javascript - mock.js可以存儲(chǔ)數(shù)據(jù)嗎6. docker安裝后出現(xiàn)Cannot connect to the Docker daemon.7. java - SSH框架中寫分頁(yè)時(shí)service層中不能注入分頁(yè)類8. docker api 開發(fā)的端口怎么獲取?9. docker容器呢SSH為什么連不通呢?10. dockerfile - 為什么docker容器啟動(dòng)不了?

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