質問編集履歴

3

onCreateの消去

2019/10/18 03:31

投稿

souja
souja

スコア13

test CHANGED
File without changes
test CHANGED
@@ -106,14 +106,6 @@
106
106
 
107
107
 
108
108
 
109
- @Override
110
-
111
- protected void onCreate(Bundle savedInstanceState) {
112
-
113
- super.onCreate(savedInstanceState);
114
-
115
- setContentView(R.layout.activity_nextpage2);
116
-
117
109
 
118
110
 
119
111
  Button button = findViewById(R.id.button4);

2

onCreateを修正しました

2019/10/18 03:31

投稿

souja
souja

スコア13

test CHANGED
File without changes
test CHANGED
@@ -30,17 +30,17 @@
30
30
 
31
31
  public class nextpage2Activity extends AppCompatActivity {
32
32
 
33
- private NumberPicker numPicker0, numPicker1, numPicker2, numPicker3, numPicker4;
33
+ private NumberPicker numPicker0, numPicker1, numPicker2;
34
34
 
35
35
  private TextView pickerTextView;
36
36
 
37
37
 
38
38
 
39
- private String[] figures = new String[5];
39
+ private String[] figures = new String[2];
40
40
 
41
41
 
42
42
 
43
- protected void onCreate(Bundle savedInstanceState) {
43
+ protected void onCreate(Bundle savedInstanceState) {
44
44
 
45
45
  super.onCreate(savedInstanceState);
46
46
 
@@ -102,13 +102,13 @@
102
102
 
103
103
  });
104
104
 
105
- }
105
+
106
106
 
107
107
 
108
108
 
109
109
  @Override
110
110
 
111
- protected void onCreate(Bundle savedInstanceState) {
111
+ protected void onCreate(Bundle savedInstanceState) {
112
112
 
113
113
  super.onCreate(savedInstanceState);
114
114
 
@@ -143,15 +143,3 @@
143
143
 
144
144
 
145
145
  ```
146
-
147
- →のところに赤の下線が引かれていて、onCreate(Bundle) is already defined in ~というエラーが表示されます。
148
-
149
-
150
-
151
- エラー
152
-
153
- メソッド onCreate(Bundle)はすでにクラス nextpage2Activityで定義されています
154
-
155
-
156
-
157
- (LogCat)2019-10-16 13:27:00.010 1599-1612/? E/memtrack: Couldn't load memtrack module

1

→の部分

2019/10/17 04:09

投稿

souja
souja

スコア13

test CHANGED
File without changes
test CHANGED
@@ -4,7 +4,9 @@
4
4
 
5
5
 
6
6
 
7
+ ```java
8
+
7
- package com.example.souja.page1;
9
+ コードpackage com.example.soja.page1;
8
10
 
9
11
 
10
12
 
@@ -38,15 +40,11 @@
38
40
 
39
41
 
40
42
 
41
- protected void OnCreate(Bundle savedInstanceState) {
43
+ protected void onCreate(Bundle savedInstanceState) {
42
44
 
43
45
  super.onCreate(savedInstanceState);
44
46
 
45
47
  setContentView(R.layout.activity_nextpage2);
46
-
47
-
48
-
49
- pickerTextView = findViewById(R.id.high);
50
48
 
51
49
 
52
50
 
@@ -60,7 +58,7 @@
60
58
 
61
59
  Button pickerButton1 = findViewById(R.id.button1);
62
60
 
63
-
61
+
64
62
 
65
63
  numPicker0.setMaxValue(9);
66
64
 
@@ -110,7 +108,7 @@
110
108
 
111
109
  @Override
112
110
 
113
- protected void onCreate(Bundle savedInstanceState) {
111
+ protected void onCreate(Bundle savedInstanceState) {
114
112
 
115
113
  super.onCreate(savedInstanceState);
116
114
 
@@ -141,3 +139,19 @@
141
139
  }
142
140
 
143
141
  }
142
+
143
+
144
+
145
+ ```
146
+
147
+ →のところに赤の下線が引かれていて、onCreate(Bundle) is already defined in ~というエラーが表示されます。
148
+
149
+
150
+
151
+ エラー
152
+
153
+ メソッド onCreate(Bundle)はすでにクラス nextpage2Activityで定義されています
154
+
155
+
156
+
157
+ (LogCat)2019-10-16 13:27:00.010 1599-1612/? E/memtrack: Couldn't load memtrack module