While migrating the android project to ANDROIDX, all the design and support libraries migrated to Androidx but Google api client is still showing error:-

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

at this line:-

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

The activity used in this is an object of androidx.fragment.app.FragmentActivity

0 Answers