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. - appengine-api-1.0-sdk-1.9.59.jar

1,150 views
Skip to first unread message

Carlos Lee

unread,
Dec 21, 2017, 8:09:27 PM12/21/17
to Google App Engine
I'm trying to migrate google appengine from V1 To V2 as per tutorialo: https://cloud.google.com/endpoints/docs/frameworks/legacy/v1/java/migrating

and I'm getting the following error:

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.     - appengine-api-1.0-sdk-1.9.59.jar (


If I add:
annotationProcessor 'com.google.appengine:appengine-api-1.0-sdk:1.9.59' in my build.gradle file, I got a different error:

Error:(58, 0) Could not find method annotationProcessor() for arguments [com.google.appengine:appengine-api-1.0-sdk:1.9.59]

Follows how my dependencies build.gradle file is:

dependencies {
providedCompile group: 'javax.servlet', name: 'servlet-api', version:'2.5'
compile 'jstl:jstl:1.2'
compile group: 'javax.inject', name: 'javax.inject', version: '1'
compile 'com.google.appengine:appengine-api-1.0-sdk:1.9.59'
compile group: 'com.google.endpoints', name: 'endpoints-framework', version: '2.0.8'

}
 Have no idea how to fix.

George (Cloud Platform Support)

unread,
Dec 22, 2017, 12:25:53 PM12/22/17
to Google App Engine
Is this related to Android Studio? If so, you may try to disable the annotation processor error check, as indicated in the "Disable the annotation processor error check" sub-chapter of the "Migrate to Android Plugin for Gradle 3.0.0"  document

android {
    ...
    defaultConfig {
        ...
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath false
            }
        }
    }
}

It may be worthwhile noting that IDE integration is not supported when migrating to endpoints frameworks for App Engine, as mentioned in the tutorial you follow.

What is the output of gcloud info? 

Carlos Lee

unread,
Dec 23, 2017, 4:41:24 PM12/23/17
to Google App Engine
Dear Gerge,

I've added:
android {
    ...
    defaultConfig {
        ...
        javaCompileOptions {
            annotationProcessorOptions {
                includeCompileClasspath false
            }
        }
    }
}

Into my project and It worked now. Thx!
Reply all
Reply to author
Forward
0 new messages