質問編集履歴
1
タイトルの修正&findViewByldの位置修正
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
XML&
|
1
|
+
XML&Kotlinにて、ボタンを押すごとにランダムで数字が変わるアプリを制作中に大量のエラー発生
|
body
CHANGED
@@ -142,12 +142,14 @@
|
|
142
142
|
val question: IntArray = IntArray(QUESTION_COUNT)
|
143
143
|
var point: Int = 0
|
144
144
|
var answerCount: Int = 0
|
145
|
-
var textView = findViewById<TextView>(R.id.textView)
|
145
|
+
~~var textView = findViewById<TextView>(R.id.textView)~~
|
146
146
|
|
147
147
|
override fun onCreate(savedInstanceState: Bundle?) {
|
148
148
|
super.onCreate(savedInstanceState)
|
149
149
|
setContentView(R.layout.activity_main)
|
150
150
|
|
151
|
+
var textView = findViewById<TextView>(R.id.textView)
|
152
|
+
|
151
153
|
for (i in 0 until QUESTION_COUNT){
|
152
154
|
val number = random.nextInt(1000)
|
153
155
|
Log.d("Number","Question"+ number.toString())
|