question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Fix breaks due to Gradle 3 upgrade?

See original GitHub issue

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?

Issue Analytics

  • State:open
  • Created 6 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
katherine95commented, Jan 19, 2018

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’ }

0reactions
choozmcommented, 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

Read more comments on GitHub >

github_iconTop Results From Across the Web

Upgrading your build from Gradle 7.x to the latest
Update your plugins. Some plugins will break with this new version of Gradle, for example because they use internal APIs that have been...
Read more >
Android Studio update breaks Gradle again - Stack Overflow
Update the Gradle version in gradle-wrapper.properties to 5.4.1 and let it download that version. It doesn't matter what is globally ...
Read more >
Use the Android Gradle plugin Upgrade Assistant
If the error message is not clear, or it's not obvious what is causing the problem, then return the project to its original...
Read more >
Fix broken Android Flutter build after Upgrade - xeladu - Medium
After these two changes, your Android build should work again. If there are still errors, it might be due to Android SDK versions....
Read more >
Bug: IDE suggest to update gradle version for a new project ...
Steps to Reproduce: 1. Create new project. ... 4. Notice it says to fix gradle version instead of doing it on its own....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found