Fix breaks due to Gradle 3 upgrade?
See original GitHub issueI am so glad you took the time to create this example. Unfortunately, after forking then cloning this project onto my Mac 10.13.1, opening the project within Android Studio 3.0.0, seeing ADB appear, I got this error message:
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.
I Googled the messages and found: https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html?utm_source=android-studio#annotationProcessor_config
https://stackoverflow.com/questions/42993587/setting-explict-annotation-processor
So I editing the project-level build.gradle file to end up with classpath ‘com.android.tools.build:gradle:3.0.1’
Then I clicked Sync.
In gradle-wrapper.properties I have: distributionUrl=https://services.gradle.org/distributions/gradle-4.1-all.zip
Following [(https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#annotationProcessor_config] I added:
annotationProcessor 'com.jakewharton:butterknife-gradle-plugin:6.1.0'
But this resulted in errors as well. So I’m lost here. Suggestions?
Issue Analytics
- State:
- Created 6 years ago
- Comments:5
Top GitHub Comments
This helped me solve the error. I found it here dependencies { compile ‘com.jakewharton:butterknife:8.8.1’ annotationProcessor ‘com.jakewharton:butterknife-compiler:8.8.1’ }
@bradley-curran I am able to build your fork but the tabs in Menu > Input Controls screen are not visible, hence the automated tests (Espresso) fail. Here’s is my fork to fix it: https://github.com/choozm/aws-device-farm-sample-app-for-android/tree/fix/PagerTabStrip