Search code examples
google-app-enginegoogle-cloud-endpointsandroid-studio-2.3

"cannot find symbol method setBatchPath(String)" in the generated source from generated endpoint


For an unknown reason, when I tried to build my Google App Engine endpoints, I get these errors in all of the API java files generated by Android Studio:

Error:(400, 5) error: method does not override or implement a method from a supertype Error:(402, 29) error: cannot find symbol method setBatchPath(String)

I did some initial troubleshooting and found out that there's a Builder class inside the java file and it extends AbstractGoogleJsonClient.Builder. I looked at the source for the Builder class and I cannot find the method.

Why all of the sudden am I getting these errors? Help!


Solution

  • Same thing happened to me this morning.

    I resolved it by adding this in my backend project

    appengine {
        endpoints {
            googleClientVersion = '1.23.0'
        }
    }
    

    and updating this version in my app gradle file.

    implementation('com.google.api-client:google-api-client-android:1.23.0')