1、AS 编码格式
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.
编码GBK的不可映射字符
tasks.withType(JavaCompile) {
options.encoding = "UTF-8"
}
2、NullPointerException: println needs a message
发生情况:
Android 中 Log 打印日志时(以Log.e(TAG,mStr)
为例),当 mStr 为 null,如下图:
则会报出 以下信息:
NullPointerException: println needs a message
在打印 Log 日志时切记保证打印信息不为 null,这些都是编程过程中的好习惯