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. php - 微信开发验证服务器有效性2. vim中编辑HTML文件时换行不能缩进3. javascript - Ajax返回json格式之后的数据解析后取出来的数据为undefined?4. java导入问题5. css - 文字排版问题,内容都是动态抓出来的,字数不一定。如何对齐啊6. 正则表达式 - Java:字符串替换带序号7. css3 - 微信前端页面遇到的transition过渡动画的bug8. 网页爬虫 - 关于Python的编码与解码问题9. git - 在web应用分布式部署的情况下怎么进行配置更新10. 前端 - WebStrom安装了angularjs插件,但是没有语法提示

网公网安备