작성자 없음
작성자 정보가 삭제된 글입니다.
작성
·
410
답변 3
0
0
설치된 것을 확인하였으나
여전히
부분의 빨간줄과 빨간문자부분이 사라지지 않는군요
dependencies {
val lifecycle_version = "2.6.2"
val arch_version = "2.1.0"
// LiveData
implementation("androidx.lifecycle:lifecycle-livedata-ktx:$lifecycle_version")
// Lifecycles only (without ViewModel or LiveData)
implementation("androidx.lifecycle:lifecycle-runtime-ktx:$lifecycle_version")
// Lifecycle-viewmodel-compose
implementation("androidx.lifecycle:lifecycle-viewmodel-compose:$lifecycle_version")
// Lifecycles-runtime-compose
implementation("androidx.lifecycle:lifecycle-runtime-compose:$lifecycle_version")
// ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:$lifecycle_version")
// Saved state module for ViewModel
implementation("androidx.lifecycle:lifecycle-viewmodel-savedstate:$lifecycle_version")
implementation("androidx.lifecycle:lifecycle-common-java8:$lifecycle_version")
// optional - helpers for implementing LifecycleOwner in a Service
implementation("androidx.lifecycle:lifecycle-service:$lifecycle_version")
// optional - ProcessLifecycleOwner provides a lifecycle for the whole application process
implementation("androidx.lifecycle:lifecycle-process:$lifecycle_version")
// optional - ReactiveStreams support for LiveData
implementation("androidx.lifecycle:lifecycle-reactivestreams-ktx:$lifecycle_version")
// optional - Test helpers for LiveData
testImplementation("androidx.arch.core:core-testing:$arch_version")
// optional - Test helpers for Lifecycle runtime
testImplementation ("androidx.lifecycle:lifecycle-runtime-testing:$lifecycle_version")
implementation("androidx.core:core-ktx:1.9.0")
implementation("androidx.lifecycle:lifecycle-runtime-ktx:2.6.2")
implementation("androidx.activity:activity-compose:1.8.0")
implementation(platform("androidx.compose:compose-bom:2023.03.00"))
implementation("androidx.compose.ui:ui")
implementation("androidx.compose.ui:ui-graphics")
implementation("androidx.compose.ui:ui-tooling-preview")
implementation("androidx.compose.material3:material3")
testImplementation("junit:junit:4.13.2")
androidTestImplementation("androidx.test.ext:junit:1.1.5")
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
androidTestImplementation(platform("androidx.compose:compose-bom:2023.03.00"))
androidTestImplementation("androidx.compose.ui:ui-test-junit4")
debugImplementation("androidx.compose.ui:ui-tooling")
debugImplementation("androidx.compose.ui:ui-test-manifest")
}
0
모듈 수준의 build.gradle 에 다음 라이브러리가 추가되었나 확인해 보세요
androidx.lifecycle:lifecycle-viewmodel-compose-ktx:2.6.2
androidx.lifecycle:lifecycle-runtime-compose:2.6.2
import 가 안 된 것은 아닌가요?
빨간 불에서 alt + enter 눌러보시지요.