- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
最近我根据这个更新了我对activity-ktx的依赖 https://developer.android.com/jetpack/androidx/releases/activity#1.2.0
但是,未找到 registerForActivityResult()
。在此更新之前它正在运行。 androidx.activity:activity-ktx:1.2.0
有什么变化吗?
最佳答案
我设法解决了我的问题。我想我会在这里发布我的答案,以防对其他人有帮助。
我的解决方案是更新此依赖项。
implementation 'androidx.appcompat:appcompat:1.3.0-beta01'
只有当我将版本更改为 1.3.0
时,我的 AS 才没有警告我更新。
PS:我指的是这个Cannot access 'androidx.activity.result.ActivityResultCaller'
关于kotlin - 找不到 Android registerForActivityResult,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66209464/
我看到的问题是您必须保证在您自己的 Activity 的 OnCreate() 完成之前调用 registerForActivityResult() 。 OnCreate() 显然不是挂起函数,所以我
最近我根据这个更新了我对activity-ktx的依赖 https://developer.android.com/jetpack/androidx/releases/activity#1.2.0 但
我最近迁移到用于注册请求权限的最新回调机制但是从未触发用于注册请求回调的最新 api 我正在附加代码 fragment ,任何人都可以帮助我找出问题所在, @AndroidEntryP
我尝试使用新的 registerForActivityResult 拍照。我可以打开相机 Intent ,但拍照后,没有触发回调,我看不到任何关于 Activity 结果或 logcat 错误的信息。
如何将此蓝牙 Activity 从 startActivityForResult 更改为 registerForActivityResult?请帮助我,因为我是 java 和 Android Stud
我需要在我的 webviewActivity 中实现选择文件选项,我发现的所有教程都只有带有 startActivityResult 的示例,但它目前已被弃用,所以我想要一些关于如何将此代码转换为新模
因为startActivityForResult已弃用。 所以我替换 startActivityForResult至registerForActivityResult这是我的代码: ActivityR
我正在使用 ActivityResultLauncher 从 Activity A 调用 Activity B并在任务完成时设置 Activity B 的结果。如果方向没有改变,这将非常有效。问题是当
我正在尝试使用此处所述的 ActivityResult API ActivityResult APIs 但它给出了 Unresolved reference 错误。 我正在使用以下依赖项 api 'a
我有一个简单的空 Activity 来检查是否需要请求权限。当registerForActivityResult被调用,它会崩溃并出现错误 java.lang.IllegalStateExceptio
我正在编写一个 Kotlin 应用程序并使用 Firebase 进行身份验证。 如onActivityResult现在已弃用,我正在尝试迁移我的应用程序以使用 registerForActivityR
我用 registerForActivityResult就像 : package com.example.livedata import android.Manifest import android
ActivityResultLauncher launcherImportFileSelection = requireActivity().registerForActivityResult(...
初始问题 (18/05/2020): 所以最新的更新来自 androidx.fragment:fragment:1.3.0- alpha07 到 androidx.fragment:fragment:
我是一名优秀的程序员,十分优秀!