android studio3.0 常见编译错误

110 阅读1分钟

问题1:正常的style找不到

解决办法:Project/gradle.properties中添加 android.enableAapt2=false 配置关闭检测

问题2: 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 (com.jakewharton:butterknife:7.0.1)
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 developer.android.com/r/tools/ann… for more details.

解决办法:bulid.gradle中defaultConfig添加依赖

javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }

\