tbruyelle / RxPermissions

Android runtime permissions powered by RxJava2
Apache License 2.0
10.48k stars 1.31k forks source link

RxPermissions don't support AndroidX #270

Closed lanzhu1993 closed 5 years ago

lanzhu1993 commented 5 years ago

When initializing objects , rxPermissions = new RxPermissions( (FragmentActivity)this);
FragmentActivity.class is android.support.v4.app.FragmentActivity; but AndroidX FragmentActivity.class is package androidx.fragment.app Cause can not Cast

consp1racy commented 5 years ago

This looks like a duplicate of https://github.com/tbruyelle/RxPermissions/issues/263.

I think it works even IDE shows error. Because i have

android.useAndroidX=true
android.enableJetifier=true

in gradle.properties

Enable jetifier which will convert all dependencies that use the old support library (including RxPermissions) to using AndroidX instead.

https://developer.android.com/jetpack/androidx/migrate

lanzhu1993 commented 5 years ago

Thank you for your answer.

jp1017 commented 5 years ago

androidx here: https://github.com/jp1017/RxPermissions/releases/tag/androidx

lanzhu1993 commented 5 years ago

thanks

aicaprio commented 5 years ago

This looks like a duplicate of #263.

I think it works even IDE shows error. Because i have

android.useAndroidX=true
android.enableJetifier=true

in gradle.properties

Enable jetifier which will convert all dependencies that use the old support library (including RxPermissions) to using AndroidX instead.

https://developer.android.com/jetpack/androidx/migrate

But there are errors warning on compile time. How can u run success?

consp1racy commented 5 years ago

Does it work when you run build from command line?

uziassantosferreira commented 5 years ago

@jp1017 Hey, How I can use your version in my project? Did you publish this version?