在将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
的对象