Skip to content

AbstractGoogleClientRequest and GoogleClientRequestInitializer class not found in

My Android app with Cloud Endpoints says these classes do not exist


when using any version higher than 1.31.0 of the following import

implementation ''

The latest version is 2.0.0 but even 1.32.1 has the issue. Anything that is 1.31.0 or lower works.

This is what my code looks like (taken from this link):

    if (myApiService == null) {  // Only do this once
        MyApi.Builder builder = new MyApi.Builder(AndroidHttp.newCompatibleTransport(),
                new AndroidJsonFactory(), null)
                .setGoogleClientRequestInitializer(new GoogleClientRequestInitializer() {
                    public void initialize(AbstractGoogleClientRequest<?> abstractGoogleClientRequest) throws IOException {
        // end options for devappserver
        myApiService =;

    try {
        return myApiService.sayHi(params[0]).execute().getData();
    } catch (IOException e) {
        return e.getMessage();

Is there a different way to be doing this in the new versions or is something else going on?



According to the documentation you shared and the code example you are following, it seems to be definitely an issue of the API version.

I highly recommend you to raise a new issue in this GitHub repository.

As soon as you receive a response in the repository, I would advise you to keep working with a lower version for the time being.