首页 > 解决方案 > 迁移到 AndroidX - ResultReceiver 在哪里

问题描述

在哪个新的 AndroidX 依赖项中ResultReceiver

我试过androidx.legacy:legacy-support-v4:1.0.0-alpha1了,假设它可能是v4由于它以前的依赖关系android.support.v4.os.ResultReceiver

我也试过这些:

implementation 'androidx.core:core:1.0.0-alpha3'
implementation 'androidx.legacy:legacy-support-v13:1.0.0-alpha3'

我认为必须有一种更聪明的方法来找出新的依赖关系?

来源:迁移到 AndroidX

编辑,搜索开发者 API...

TraceCompat

TraceCompat 示例

接收结果

结果接收器示例

难道新系统里没有?

标签: javaandroidandroid-support-libraryandroidxandroid-jetpack

解决方案


我有它implementation 'androidx.core:core:1.0.2'

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package android.support.v4.os;

import android.os.Bundle;
import android.os.Handler;
import android.os.Parcel;
import android.os.Parcelable;
import android.os.RemoteException;
import android.os.Parcelable.Creator;
import android.support.v4.os.IResultReceiver.Stub;
import androidx.annotation.RestrictTo;
import androidx.annotation.RestrictTo.Scope;

@RestrictTo({Scope.LIBRARY_GROUP})
public class ResultReceiver implements Parcelable {
...

还有这个

//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package android.os;

import android.os.Parcelable.Creator;

public class ResultReceiver implements Parcelable {

推荐阅读