小编Eme*_*kpo的帖子

使用应用内更新时`com.google.android.play.core.install.InstallException:安装错误:-6`

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

implementation 'com.google.android.play:core:1.5.0'
Run Code Online (Sandbox Code Playgroud)

这是我用来检查更新的代码

val updateManager = AppUpdateManagerFactory.create(this)
        updateManager.appUpdateInfo.addOnSuccessListener {
            //code to run is its successful
        }.addOnFailureListener {
            //something wrong happened
            it.printStackTrace()

        }
Run Code Online (Sandbox Code Playgroud)

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

android kotlin google-play-services

6
推荐指数
1
解决办法
2651
查看次数

使用 MotionLayout 时如何将 tint 指定为 ImageView 上的自定义属性

使用 MotionLayout 时,如何将 imageView 的色调颜色指定为自定义属性。目前我只能在我的MotionScenexml 文件中指定自定义背景颜色:

<ConstraintSet android:id="@+id/end">
    <Constraint
        android:id="@+id/imageView"
        android:layout_width="180dp"
        android:layout_height="180dp"
        motion:layout_constraintBottom_toBottomOf="parent"
        motion:layout_constraintEnd_toEndOf="parent"
        motion:layout_constraintStart_toStartOf="parent"
        motion:layout_constraintTop_toTopOf="parent"
        motion:layout_constraintVertical_bias="0.75"
        motion:srcCompat="@drawable/ic_android_black_24dp" >
        <CustomAttribute
            motion:attributeName="backgroundColor"
            motion:customColorValue="#9999FF" />
    </Constraint>
</ConstraintSet>
Run Code Online (Sandbox Code Playgroud)

android android-constraintlayout

5
推荐指数
3
解决办法
2380
查看次数

Kotlin 中 println 前的双冒号是什么意思

println下面的 Kotlin 代码中前面的双冒号是什么意思?

class InitOrderDemo(name: String) {
   val firstProperty = "First property: $name".also(::println)
}
Run Code Online (Sandbox Code Playgroud)

代码打印:

第一个属性:你好

kotlin

5
推荐指数
1
解决办法
3057
查看次数