aws-samples / aws-samples/aws-device-farm-sample-app-for-android

Fix breaks due to Gradle 3 upgrade?

Open
#15 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
174
Forks
205
PR merge metrics
No merged PRs in 30d

Description

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?

Contributor guide

Open the contributing guide

Research direction

Start with the project-level build.gradle and gradle-wrapper.properties, then reproduce the Gradle sync in Android Studio 3.0.0 using the versions described in the report. Compare the annotation-processor configuration with the reported Butter Knife dependency and verify that the project syncs and builds without the javaPreCompileDebug error.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java
Domain
build-system, mobile
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.