无法针对AndroidX解析GoogleAPIClient

时间:2019-04-23 06:16:46

标签: android google-api-client androidx

在将android项目迁移到ANDROIDX时,所有设计和支持库都迁移到了Androidx,但是Google api客户端仍显示错误:-

 error: incompatible types: androidx.fragment.app.FragmentActivity cannot be converted to android.support.v4.app.FragmentActivity

在此行:-

mGoogleApiClient = new GoogleApiClient.Builder(activity)
                .enableAutoManage(activity, this)
                .addApi(Auth.GOOGLE_SIGN_IN_API, gso)
                .build();

此活动是androidx.fragment.app.FragmentActivity的对象

0 个答案:

没有答案