java - Android Studio編譯打包Apk出現錯誤
問題描述
打包Apk的時候出現“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
相關文章:
1. css - 如何把一個視圖放在左浮動定位的視圖的上面?2. python的正則怎么同時匹配兩個不同結果?3. php多任務倒計時求助4. javascript - axios請求回來的數據組件無法進行綁定渲染5. javascript - vue中怎么使用原生js插件6. MySQL的聯合查詢[union]有什么實際的用處7. javascript - jquery怎么讓a標簽跳轉后保持tab的樣式8. css - 子元素跑到父元素外面9. javascript - 小demo:請教怎么做出類似于水滴不斷擴張的效果?10. javascript - 請問下面代碼中的...是擴展運算符還是操作運算符?這樣寫是什么意思?
