Open yuandoudou928 opened 2 years ago
import android.support.v7.app.AppCompatActivity; import com.trello.rxlifecycle2.LifecycleProvider; import com.trello.rxlifecycle2.LifecycleTransformer; import com.trello.rxlifecycle2.RxLifecycle; import com.trello.rxlifecycle2.android.ActivityEvent; import com.trello.rxlifecycle2.android.RxLifecycleAndroid; import io.reactivex.Observable; import io.reactivex.subjects.BehaviorSubject;
public abstract class RxAppCompatActivity extends AppCompatActivity implements LifecycleProvider {
有解决吗?我也是这个问题
在gradle.properties当中增加 android.useAndroidX=true android.enableJetifier=true 再添加v7的包 让项目同时支持support 和 androidX
import android.support.v7.app.AppCompatActivity; import com.trello.rxlifecycle2.LifecycleProvider; import com.trello.rxlifecycle2.LifecycleTransformer; import com.trello.rxlifecycle2.RxLifecycle; import com.trello.rxlifecycle2.android.ActivityEvent; import com.trello.rxlifecycle2.android.RxLifecycleAndroid; import io.reactivex.Observable; import io.reactivex.subjects.BehaviorSubject;
public abstract class RxAppCompatActivity extends AppCompatActivity implements LifecycleProvider {