Error:Execution failed for task ':app:javaPreCompileDebug'异常

  • 时间:
  • 浏览:41
  • 来源:恰卡网

android studio3.0升级之后出现Error:Execution failed for task ':app:javaPreCompileDebug'异常,这是因为butterknife错误造成的,具体异常如下:

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-6.1.0.jar (com.jakewharton:butterknife:6.1.0)

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.

解决方案:修改build.gradle文件,添加如下配置内容即可

android{
	defaultConfig{
		...
		javaCompileOptions{
			annotationProcessorOptions{
				includeCompileClasspath=true
			}
		}
	}
}

猜你喜欢

mysql的日志类型-程序员一代码搬运工

1.错误日志记录启动、运行或停止mysqld时出现的问题log-error=d:/mysql_log_err.txt2.查询日志记录建立的客户端连接和执行的所有语句(包括错误的

2019-06-21

id自增异常Field ‘id’ doesn’t have a default value-Java学习

###Cause:java.sql.SQLException:Generalerror,messagefromserver:“Field‘id̵

2019-06-21

The server time zone value ‘ й ׼ʱ ‘ is unrecognized or represents more than one time zone. You mu-Java学习

方法:数据库连接串加上时区解释:在访问数据库时出现时区无法识别问题,在通过在数据库连接URL后,加上?serverTimezone=UTC,时区是确认了但是这默认是0市区,导致

2019-06-21