我注意到Android上的Compose实际上是由AndroidComposeView实现的,当compose状态改变,composable函数开始重组时,AndroidComposeView.invalidate()将从布局节点层调用(至少目前在androidx仓库的主分支中)。
// For example: RenderNodeLayout
internal class RenderNodeLayer(
val ownerView: AndroidComposeView,
...
) : OwnedLayer {
...
override fun i
我刚刚升级了一个功能齐全的应用程序,从Compos1.0.5升级到1.1.0。它构建时没有错误,也没有警告。然而,它不再发射了。
Android中的Problems选项卡表明104 problems与Choreographer.java ~/Android/Sdk/sources/android-31/android/view相关
build.gradle (:app)
plugins {
id 'com.android.application'
id 'kotlin-android'
id 'kotlin-kapt'
在我将Jetpack Compose升级到1.0.0-Beta07之后,在LiveData对象上运行observeAsState时出现以下错误。 java.lang.NoSuchMethodError: No interface method startReplaceableGroup(ILjava/lang/String;)V in class Landroidx/compose/runtime/Composer; or its super classes The documentation说,这个错误在升级时就会出现,为了解决这个问题,必须重新编译依赖于Compose的库。 我不知道该怎
我正在实现用于存储jetpack联系人的房间数据库,在AndroidStudioBumblebe2021.1.1金丝雀10上编写项目。但是我得到了一个错误,如下所示
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.tana.contactapp, PID: 8843
java.lang.RuntimeException: cannot find implementation for com.tana.contactapp.data.ContactAppDatabase. ContactAppDatabase_Impl does not
利用构建小型机房数据库应用程序。我不断犯错误:
Cannot create an instance of class com.learning.kotlinreadexstingroomdb.MainViewModel
...
Caused by: java.lang.InstantiationException: java.lang.Class<com.learning.kotlinreadexstingroomdb.MainViewModel> has no zero argument constructor
at java.lang.Class.newInst
我目前正在关注Android Room with a View codelab,并尝试在Jetpack Compose中采用它。我陷入了在组合函数中初始化viewModel的困境。 我得到的错误是: None of the following functions can be called with the arguments supplied:
public inline fun <reified VM : ViewModel> viewModel(viewModelStoreOwner: ViewModelStoreOwner = ..., key: String? = .
我试着从ScheduleScreen屏幕上存储一些日子。Lib在主题主题中使用。
当我这样做的时候,我有两个问题:
为什么我会犯这个错误
Cannot create an instance of class com.example.ic.ScheduleScreenVM
at androidx.lifecycle.ViewModelProvider$NewInstanceFactory.create等
和我如何存储我的日子。
所以我的课:
为存储日创建表daysTable
@Entity()
data class DaysChoosenEntity(
var daysChoosen:
我看过这里和其他网站,但我找不到解决方案。 在我用MainActivity.kt初始化RoomViewModel.kt之前,一切都运行得很好。 我一直收到这个错误 java.lang.RuntimeException: cannot find implementation for com.caller.fakecaller.data.DataBase. DataBase_Impl does not exist
at androidx.room.Room.getGeneratedImplementation(Room.java:97)
at androi
我在kotlin做字典应用已经有一段时间了。我希望用户能够创建自己的字典作为应用程序的一个功能,我使用这个房间数据库,我已经完成了所有的集成,但我不明白它为什么会不断出错。我检查了所有的东西,但找不到问题的根源。我将分享我的代码和错误。
误差
error: Entities and POJOs must have a usable public constructor. You can have an empty constructor or a constructor whose parameters match the fields (by name and type). - kotlin
这太荒谬了,当我有这样的错误时,我会犯这样的错误:id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
更新:全天运转良好。就在我决定加入这个项目的时候,,也就是问题开始出现的时候。不知道为什么,我遵守了网站上的所有说明。
安装了Android:
错误:
> Task :app:compileDebugKotlin FAILED
e: This version (1.1.1) of the Compose Compiler requires Kotlin version 1.
我正在开发新的android应用程序,但当我运行时,会出现以下错误
*> Task :app:kaptDebugKotlin
error: [Hilt]
@InstallIn, 'value' class is invalid or missing: @dagger.hilt.InstallIn({})
[Hilt] Processing did not complete. See error above for details.
C:\Users\Yodgorbek\AndroidStudioPro
问题描述
我正在尝试使用jetpack compose 1.1.0-rc02的最新版本,但一些依赖项正在返回一个错误:
Failed to resolve: androidx.compose.material:material:1.1.0-rc02
Failed to resolve: androidx.compose.ui:ui:1.1.0-rc02
Failed to resolve: androidx.compose.ui:ui-tooling:1.1.0-rc02
Failed to resolve: androidx.compose.ui:ui-tooling-preview:1.1
你好,在添加了Room依赖项并更改Kotlin版本后,我遇到了一个错误,似乎无法解决这个问题。
错误:
/Users/Erin/.gradle/caches/transforms-3/c3d04919ade1d841f45db1aa77dde355/transformed/room-runtime-2.4.3-api.jar!/META-INF/room-runtime_release.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its meta
我在我的项目中使用一个Room数据库,它在生产中工作,包括UI测试(使用Espresso),直到Android 8。在Android 9上,我的UI测试失败了,因为数据库没有创建。我在logcat中得到以下错误消息
android.database.sqlite.SQLiteException: no such table: table (code 1 SQLITE_ERROR): , while compiling: SELECT * FROM table WHERE type = ?
这种情况只发生在Android 9设备上。在使用Stetho进行调试时,我也找不到db文件。在Androi
最近我在玩Jetpack Compose,我注意到文本可能不会在TextField中显示。 所以我有一个Flow为ViewState的ViewModel。 在我的Compose文件中,我有类似如下的内容: @Composable
internal fun TestScreen() {
val state by viewModel.state.collectAsState()
TestScreen {
viewState = state,
actioner = { ... }
}
}
@Composable
private fun Te
I当我尝试实现一个Room数据库时,我得到了以下错误:
java.lang.RuntimeException: cannot find implementation for com.udacity.gradle.builditbigger.Database.HilarityUserDatabase. HilarityUserDatabase_Impl does not exist
at android.arch.persistence.room.Room.getGeneratedImplement
我打开了我的项目,编译并运行了它,我得到了标题error: cannot find symbol class ComputableLiveData中提到的错误。我使用SQLite上的Room抽象构建了一个本地数据库,并且错误发生在BundleDao_Impl.java中。
package com.weaberlumber.programmer.s4s_scan;
import android.arch.lifecycle.ComputableLiveData; //The error is here
import android.arch.lifecycle.LiveData;
import