android - `com.google.android.play.core.install.InstallException: Install Error: -6` 使用应用内更新时

标签 android kotlin google-play-services

这个问题在这里已经有了答案:





Android, InstallException occurs when I use in-app updates

(2 个回答)


3年前关闭。




我正在尝试使用 play-core 库实现应用内更新。
我正在使用依赖项

implementation 'com.google.android.play:core:1.5.0'

这是我用来检查更新的代码
val updateManager = AppUpdateManagerFactory.create(this)
        updateManager.appUpdateInfo.addOnSuccessListener {
            //code to run is its successful
        }.addOnFailureListener {
            //something wrong happened
            it.printStackTrace()

        }
Onsuccess在某些设备上调用,但在某些 onFailedListener 上调用被调用并抛出此错误com.google.android.play.core.install.InstallException: Install Error: -6

最佳答案

在这里查看developer docs
在哪里 Install Error: -6方法

The download/install is not allowed, due to the current device state (e.g. low battery, low disk space, ...).

Constant Value: -6 (0xfffffffa)

关于android - `com.google.android.play.core.install.InstallException: Install Error: -6` 使用应用内更新时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56578021/

相关文章:

java - 将BaseGameUtils添加到libgdx项目时出现问题

java - Google Play - 安装了应用内更新,但一次又一次显示更新可用

android - 无法删除 Lollipop 中以编程方式添加的联系人

android - 如何引用阶段?使用 flex for Facebook actionscript 移动 API 登录方法

jvm - Kotlin 中的 COROUTINE_SUSPENDED 和 suspendCoroutineOrReturn

android - Jetpack Compose 中的长按手势

android - 如何使工具栏上的操作菜单居中

android - 如何使用 DexGuard 混淆 XML 资源文件?

function - Kotlin:覆盖(并指定)通用接口(interface)函数

c# - 无法将 Google Play 服务添加到 Xamarin Android 项目