android studio 更新3.0后多渠道打包配置问题
2017-12-22 16:58
375 查看
1,多渠道打包 维度问题
在主app的build.gradle里面的
defaultConfig {
targetSdkVersion:***
minSdkVersion :***
versionCode:***
versionName :***
//版本名后面添加一句话,意思就是flavor dimension 它的维度就是该版本号,这样维度就是都是统一的了
flavorDimensions "versionCode"
}
详情:http://blog.csdn.net/syif88/article/details/75009663
2.gradle打包,自定义apk名称代码报错(Cannot set the value of read-only property 'outputFile' )
报错
Error:(56, 0) Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[]}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.
<a href="openFile:D:\eclipseCode\ipay-android\xinlebao\build.gradle" rel="external nofollow" >Open File</a>
解决 :修改文件名代码请这样写
?
3. AAPT2 编译报错 AAPT2 error
报错
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
解决:在gradle.properties中关闭APPT2 编译
?
注:如果是eclipse转到as上的项目,可能没有gradle.properties文件,请在项目根目录中手动创建
4.apt插件问题(Error:Cannot choose between the following configurations of project :mylibrary:)
报错:
Error:Cannot choose between the following configurations of project :mylibrary:
- debugApiElements
- debugRuntimeElements
- releaseApiElements
- releaseRuntimeElements
All of them match the consumer attributes:
解决
?
其他使用apt的依赖,也要这样更改
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。
在主app的build.gradle里面的
defaultConfig {
targetSdkVersion:***
minSdkVersion :***
versionCode:***
versionName :***
//版本名后面添加一句话,意思就是flavor dimension 它的维度就是该版本号,这样维度就是都是统一的了
flavorDimensions "versionCode"
}
详情:http://blog.csdn.net/syif88/article/details/75009663
2.gradle打包,自定义apk名称代码报错(Cannot set the value of read-only property 'outputFile' )
报错
Error:(56, 0) Cannot set the value of read-only property 'outputFile' for ApkVariantOutputImpl_Decorated{apkData=Main{type=MAIN, fullName=debug, filters=[]}} of type com.android.build.gradle.internal.api.ApkVariantOutputImpl.
<a href="openFile:D:\eclipseCode\ipay-android\xinlebao\build.gradle" rel="external nofollow" >Open File</a>
解决 :修改文件名代码请这样写
?
报错
Error:java.util.concurrent.ExecutionException: com.android.tools.aapt2.Aapt2Exception: AAPT2 error: check logs for details
解决:在gradle.properties中关闭APPT2 编译
?
4.apt插件问题(Error:Cannot choose between the following configurations of project :mylibrary:)
报错:
Error:Cannot choose between the following configurations of project :mylibrary:
- debugApiElements
- debugRuntimeElements
- releaseApiElements
- releaseRuntimeElements
All of them match the consumer attributes:
解决
?
以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持脚本之家。
相关文章推荐
- Android studio 3.0上进行多渠道打包遇到的问题
- Android studio 3.0上进行多渠道打包遇到的问题小结(超简洁版)
- Android studio 3.0上进行多渠道打包遇到的问题
- 微信小坑:更换applicationId,微信WXPayEntryActivity多渠道打包配置问题。
- 腾讯Tinker 热修复 Andriod studio 3.0 配置和集成(二)多渠道打包和补丁发布
- 关于Android Studio 更新到3.0版本以后出现的一些问题以及解决方案
- Android Studio升级到3.0的打包配置
- Android studio更新到3.0后问题解决
- 更新到Android Studio 3.0项目迁移遇到的问题解决方案
- android studio 3.0 gradle 打包脚本配置详解
- Android Studio多渠道打包配置
- 更新Android Studio 3.0碰到的问题小结
- Android Studio 3.0 下 Cordova 打包时 Gradle 兼容性问题解决
- Android Studio Gradle多渠道打包(动态设定App名称,应用图标,背景图片,状态栏颜色)、配置签名文件
- 解决Android Studio 3.0 butterknife:7.0.1配置的问题
- Android studio 多渠道(多环境)打包grade配置详解
- Android Studio gradle 配置 多渠道打包
- Android Studio 多个编译环境配置 多渠道打包 APK输出配置
- android studio更新之后打包遇到V1(Jar Signature)、 V2(Full APK Signature)问题
- Android studio 3.0上进行多渠道打包