Android Studio3.0升级遇到的坑
来源:互联网 发布:凯里欧文体测数据 编辑:程序博客网 时间:2024/06/05 17:18
小白踩坑...
1.项目中libs文件夹里引入了butterknife-7.0.1.jar包报错:
Error:Execution failed for task ':app:javaPreCompileDebug'.
> Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor. Please add them to the annotationProcessor configuration.
- butterknife-7.0.1.jar (butterknife-7.0.1.jar)
Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior. Note that this option is deprecated and will be removed in the future.
See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.
大概意思就是:注释处理器现在必须明确地声明。在编译类路径上的依赖项被发现包含注释处理器(即butterknife-7.0.1.jar),请将它们添加到注释处理器配置中。
解决:在app的build.gradle文件内defaultConfig{}里添加
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath true
}
}
annotationProcessorOptions {
includeCompileClasspath true
}
}
如图:
2.gradle打包,自定义apk名称代码报错:
Error:(60, 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.
解决:在app的buide.gradle文件内修改AS3.0版本之前输出自定义apk名字的代码,如图:
阅读全文
0 0
- Android Studio3.0升级遇到的坑
- Android Studio3.0升级gradle遇到的坑
- Android Studio3.0升级gradle遇到的坑
- 升级到Android Studio3.0遇到的问题
- 大概整理下升级到Android Studio3.0遇到的问题
- 记录升级Android studio3.0遇到的一些问题和解决方法
- 升级Android Studio3.0之后引发的一连串血案
- Android Studio3.0多渠道打包遇到的问题
- android studio3.0升级问题记录
- Android Studio3.0下载的坑
- 最新升级Android Studio3.0及Android Studio3.1,输入法输入中文,卡顿,出不来提示的情况终极解决方案
- 最新升级Android Studio3.0及Android Studio3.1,输入法输入中文,卡顿,出不来提示的情况终极解决方案
- 升级Studio3.0的一个问题
- 升级Android Studio3.0,输入法输入中文,卡顿、出不来提示的情况终极解决方案!
- Android Studio3.0.1版本更新后遇到的问题
- 关于Android studio3.0的坑之butterknife 8.4.0
- MacOs安装Android Studio3.0的一些坑点
- Android Studio3.0,卡编译的解决办法...
- Sobel算子的理解
- Android Sqlite
- 试验三
- 宝塔上运用它给的 重启和关闭 tomcat的方式 不管用解决办法
- iview中select过滤模式选中内容与显示内容不符合
- Android Studio3.0升级遇到的坑
- 主成份分析图解
- new和delte的使用浅析
- 欢迎使用CSDN-markdown编辑器
- 数据结构第四周项目-单链表算法
- 【转】SLAM资料汇总
- 十一周项目四
- mysql字符转义
- swoole初学笔记,个人观点