質問編集履歴
1
試したことを記述しなおしました
test
CHANGED
File without changes
|
test
CHANGED
@@ -92,6 +92,18 @@
|
|
92
92
|
|
93
93
|
チュートリアルの完成形のコードを実行するとしっかり動きます。ですが、自分で作ってみるとエラーになってしまいます。チュートリアルをそのまままねしているだけだと思うのですが。
|
94
94
|
|
95
|
+
また、gradleにdependencies {
|
96
|
+
|
97
|
+
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0'
|
98
|
+
|
99
|
+
}
|
100
|
+
|
101
|
+
を記述しましたが、下のエラーになります
|
102
|
+
|
103
|
+
”Duplicate class androidx.lifecycle.ViewModelLazy found in modules jetified-lifecycle-viewmodel-ktx-2.2.0-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.2.0) and lifecycle-viewmodel-2.5.1-runtime (androidx.lifecycle:lifecycle-viewmodel:2.5.1)
|
104
|
+
|
105
|
+
Go to the documentation to learn how to Fix dependency resolution errors.”
|
106
|
+
|
95
107
|
|
96
108
|
|
97
109
|
ここに問題に対して試したことを記載してください。
|