【问题标题】:Migration to AndroidX - Where is ResultReceiver迁移到 AndroidX - ResultReceiver 在哪里
【发布时间】:2018-12-07 11:57:53
【问题描述】:

ResultReceiver是哪个新的AndroidX依赖?

我试过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'

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

来源:Migrating to AndroidX

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

TraceCompat

接收者结果

难道新系统里没有?

【问题讨论】:

  • 我不知道它在旧系统中。我还没有看到android.support.v4.os.ResultReceiver。它在什么神器里?
  • 包是android.support.v4.os.ResultReceiver,它在工件com.android.support:support-compat:27.1.1中。你可以找到它here(或在最新的 28 alpha 中)。
  • 奇怪的是他们在 JavaDocs 中不再有android.support.v4.os.ResultReceiver。奇怪的是,如果我手动查看androidx:core:1.0.0-alpha3 AAR,我会看到android.support.v4.os.ResultReceiver。所以,我不知道他们的计划是什么。
  • @Knossos - 你知道要为 ResultReceiver 添加哪个依赖项

标签: java android android-support-library androidx android-jetpack


【解决方案1】:

我在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 {

【讨论】:

  • 它似乎也在1.0.1 中。有趣:+1:
猜你喜欢
  • 1970-01-01
  • 2020-02-03
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2019-06-27
  • 2020-01-27
  • 2019-11-05
相关资源
最近更新 更多