質問編集履歴

3

log編集

2021/07/23 05:46

投稿

Myuya69364760
Myuya69364760

スコア9

test CHANGED
File without changes
test CHANGED
@@ -140,24 +140,12 @@
140
140
 
141
141
  ```
142
142
 
143
- 2021-07-23 14:28:34.449 9280-9280/com.example.realtimedatabasetest I/ViewRootImpl: jank_removeInvalidNode all the node in jank list is out of time
143
+ 2021-07-23 14:45:29.857 12301-12301/com.example.realtimedatabasetest D/value: save start
144
144
 
145
- 2021-07-23 14:28:34.533 9280-9280/com.example.realtimedatabasetest D/value: save start
145
+ 2021-07-23 14:45:29.857 12301-12301/com.example.realtimedatabasetest D/value: save end
146
146
 
147
- 2021-07-23 14:28:34.533 9280-9280/com.example.realtimedatabasetest D/value: save end
147
+ 2021-07-23 14:45:29.876 12301-12301/com.example.realtimedatabasetest I/ViewRootImpl: jank_removeInvalidNode all the node in jank list is out of time
148
148
 
149
- 2021-07-23 14:28:34.538 9280-9467/com.example.realtimedatabasetest W/System: Ignoring header X-Firebase-Locale because its value was null.
150
-
151
- 2021-07-23 14:28:34.550 9280-9280/com.example.realtimedatabasetest D/value: Value is: null
152
-
153
- 2021-07-23 14:28:35.071 9280-9555/com.example.realtimedatabasetest D/OpenGLRenderer: HWUI Binary is enabled
154
-
155
- 2021-07-23 14:28:35.090 9280-9555/com.example.realtimedatabasetest D/OpenGLRenderer: HWUI Binary is enabled
156
-
157
- 2021-07-23 14:28:35.116 9280-9555/com.example.realtimedatabasetest D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
158
-
159
- 2021-07-23 14:28:37.073 9280-9555/com.example.realtimedatabasetest W/libEGL: EGLNativeWindowType 0x7aef42f010 disconnect failed
160
-
161
-
149
+ 2
162
150
 
163
151
  ```

2

logの追加

2021/07/23 05:46

投稿

Myuya69364760
Myuya69364760

スコア9

test CHANGED
File without changes
test CHANGED
@@ -140,10 +140,24 @@
140
140
 
141
141
  ```
142
142
 
143
- 2021-07-21 17:57:50.094 10009-10009/com.example.kotlinmessenger D/value: save start
143
+ 2021-07-23 14:28:34.449 9280-9280/com.example.realtimedatabasetest I/ViewRootImpl: jank_removeInvalidNode all the node in jank list is out of time
144
144
 
145
- 2021-07-21 17:57:50.094 10009-10009/com.example.kotlinmessenger D/value: save is: null
145
+ 2021-07-23 14:28:34.533 9280-9280/com.example.realtimedatabasetest D/value: save start
146
146
 
147
- 2021-07-21 17:57:50.094 10009-10009/com.example.kotlinmessenger D/value: save end
147
+ 2021-07-23 14:28:34.533 9280-9280/com.example.realtimedatabasetest D/value: save end
148
+
149
+ 2021-07-23 14:28:34.538 9280-9467/com.example.realtimedatabasetest W/System: Ignoring header X-Firebase-Locale because its value was null.
150
+
151
+ 2021-07-23 14:28:34.550 9280-9280/com.example.realtimedatabasetest D/value: Value is: null
152
+
153
+ 2021-07-23 14:28:35.071 9280-9555/com.example.realtimedatabasetest D/OpenGLRenderer: HWUI Binary is enabled
154
+
155
+ 2021-07-23 14:28:35.090 9280-9555/com.example.realtimedatabasetest D/OpenGLRenderer: HWUI Binary is enabled
156
+
157
+ 2021-07-23 14:28:35.116 9280-9555/com.example.realtimedatabasetest D/mali_winsys: EGLint new_window_surface(egl_winsys_display *, void *, EGLSurface, EGLConfig, egl_winsys_surface **, EGLBoolean) returns 0x3000
158
+
159
+ 2021-07-23 14:28:37.073 9280-9555/com.example.realtimedatabasetest W/libEGL: EGLNativeWindowType 0x7aef42f010 disconnect failed
160
+
161
+
148
162
 
149
163
  ```

1

再執行した際のコードを添付

2021/07/23 05:30

投稿

Myuya69364760
Myuya69364760

スコア9

test CHANGED
File without changes
test CHANGED
@@ -48,7 +48,7 @@
48
48
 
49
49
 
50
50
 
51
- ref.setValue(user).addOnSuccessListener {
51
+ val result = ref.setValue(user).addOnSuccessListener {
52
52
 
53
53
  Log.d("value", "Finally we saved the user to Firebase Database")
54
54
 
@@ -58,13 +58,33 @@
58
58
 
59
59
  startActivity(intent)
60
60
 
61
+ }.addOnFailureListener {
62
+
63
+ Log.d("value", "save is not Success")
64
+
65
+ }.addOnCompleteListener {
66
+
67
+ Log.d("value", "save is Complete")
68
+
69
+ }.addOnCanceledListener {
70
+
71
+ Log.d("value", "save is Canceled")
72
+
61
73
  }
74
+
75
+
76
+
77
+ // エラーがあるかどうか(使い方あってるか不明...)
78
+
79
+ Log.d("value", "save is: ${result.exception?.printStackTrace()}")
62
80
 
63
81
 
64
82
 
65
83
  Log.d("value", "save end")
66
84
 
67
- }
85
+ }
86
+
87
+
68
88
 
69
89
  ```
70
90
 
@@ -120,8 +140,10 @@
120
140
 
121
141
  ```
122
142
 
123
- 2021-07-21 00:01:21.960 12016-12016/com.example.kotlinmessenger D/value: save start
143
+ 2021-07-21 17:57:50.094 10009-10009/com.example.kotlinmessenger D/value: save start
124
144
 
145
+ 2021-07-21 17:57:50.094 10009-10009/com.example.kotlinmessenger D/value: save is: null
146
+
125
- 2021-07-21 00:01:21.970 12016-12016/com.example.kotlinmessenger D/value: save end
147
+ 2021-07-21 17:57:50.094 10009-10009/com.example.kotlinmessenger D/value: save end
126
148
 
127
149
  ```