Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix breaks due to Gradle 3 upgrade? #15

Open
wilsonmar opened this issue Nov 30, 2017 · 5 comments
Open

Fix breaks due to Gradle 3 upgrade? #15

wilsonmar opened this issue Nov 30, 2017 · 5 comments

Comments

@wilsonmar
Copy link

wilsonmar commented Nov 30, 2017

I 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?

@rahaprogramming
Copy link

Also gave this a shot and got this error. too bad

@bradley-curran
Copy link

I've created a fork for this fix.

https://github.com/bradley-curran/aws-device-farm-sample-app-for-android/tree/feature/gradle3

@wilsonmar, @rahaprogramming Can you try this fork and let me know if it works for you?

@katherine95
Copy link

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
Copy link

@choozm
Copy link

choozm commented Mar 12, 2018

@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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants