GoogleApiClient.connect()' was expected to be of type interface but was found to be virtual

前端 未结 3 1920
南旧
南旧 2020-12-31 04:50

So I am connecting to the google api client like this.

        googleApiClient = new GoogleApiClient.Builder(context)
        .addApi(LocationServices.API)
          


        
3条回答
  •  盖世英雄少女心
    2020-12-31 05:19

    The problem comes from one of the libraries your app depends on, library that depends itself on Google Play Services as well.

    That library is using an older version of the Google Play Services SDK and it still relies on the fact that GoogleApiClient class is an interface. This has changed in 8.1.0 where it became an abstract class. This breaks backward compatibility because of the transitive dependencies of libraries.

    Look if that library you use has a new updated version with 8.1.0 as well, or remove that dependency if possible.

    More explanation can be found here.

提交回复
热议问题