質問編集履歴

8

manifuestfileを追加しました。

2016/05/11 10:16

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -291,3 +291,57 @@
291
291
  1 errorfound
292
292
 
293
293
  1 warningfound となりました。
294
+
295
+
296
+
297
+ ```xml
298
+
299
+ <?xml version="1.0" encoding="utf-8"?>
300
+
301
+ <manifest xmlns:android="http://schemas.android.com/apk/res/android"
302
+
303
+ package="jp.study.example37" >
304
+
305
+
306
+
307
+ <application
308
+
309
+ android:allowBackup="true"
310
+
311
+ android:icon="@mipmap/ic_launcher"
312
+
313
+ android:label="@string/app_name"
314
+
315
+ android:supportsRtl="true"
316
+
317
+ android:theme="@style/AppTheme" >
318
+
319
+ <activity
320
+
321
+ android:name=".MainActivity"
322
+
323
+ android:label="@string/app_name"
324
+
325
+ android:theme="@style/AppTheme.NoActionBar" >
326
+
327
+ <intent-filter>
328
+
329
+ <action android:name="android.intent.action.MAIN" />
330
+
331
+
332
+
333
+ <category android:name="android.intent.category.LAUNCHER" />
334
+
335
+ </intent-filter>
336
+
337
+ </activity>
338
+
339
+ </application>
340
+
341
+
342
+
343
+ </manifest>
344
+
345
+
346
+
347
+ ```

7

詳細の追加

2016/05/11 10:16

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -278,13 +278,11 @@
278
278
 
279
279
  ```
280
280
 
281
- このようなエラーも出てい
281
+ エラーが変わりした
282
282
 
283
283
  ![イメージ説明](c9e8a799a5d29ed054c28be5d20d88f7.png)
284
284
 
285
- どうぞよろしくお願いします
285
+ すべてに先行て、宣言をしてださと出ま
286
-
287
- エラーが変わりました。
288
286
 
289
287
  さらに、
290
288
 

6

写真の変更

2016/05/11 08:45

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -280,6 +280,16 @@
280
280
 
281
281
  このようなエラーも出ています。
282
282
 
283
- ![イメージ説明](c5f6a109b0fea2b916e73902198f975d.png)
283
+ ![イメージ説明](c9e8a799a5d29ed054c28be5d20d88f7.png)
284
284
 
285
285
  どうぞよろしくお願いします。
286
+
287
+ エラーが変わりました。
288
+
289
+ さらに、
290
+
291
+ Analysis Completed
292
+
293
+ 1 errorfound
294
+
295
+ 1 warningfound となりました。

5

誤字の修正

2016/05/11 08:43

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -148,7 +148,7 @@
148
148
 
149
149
 
150
150
 
151
- このonCreateのR と findByIdが赤文字となってしまいます。
151
+ このonCreateのRが赤文字となってしまいます。
152
152
 
153
153
  ```java
154
154
 
@@ -212,7 +212,7 @@
212
212
 
213
213
 
214
214
 
215
- mInputMessage=(EditText)findById(R.id.input_message);//ユーザーが入力するフィールド
215
+ mInputMessage=(EditText)findViewById(R.id.input_message);//ユーザーが入力するフィールド
216
216
 
217
217
  mSendMessage=(Button)findViewById(R.id.send_message);//SENDボタン
218
218
 

4

写真の追加

2016/05/11 08:21

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -278,6 +278,8 @@
278
278
 
279
279
  ```
280
280
 
281
+ このようなエラーも出ています。
282
+
281
- このstartだけカラーにならないのですが、何が問題なのでしょうか?
283
+ ![イメージ説明](c5f6a109b0fea2b916e73902198f975d.png)
282
284
 
283
285
  どうぞよろしくお願いします。

3

コードの追加

2016/05/11 07:57

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -148,6 +148,136 @@
148
148
 
149
149
 
150
150
 
151
+ このonCreateのR と findByIdが赤文字となってしまいます。
152
+
153
+ ```java
154
+
155
+ package jp.study.chatapplication;
156
+
157
+
158
+
159
+ import android.os.Bundle;
160
+
161
+ import android.support.design.widget.FloatingActionButton;
162
+
163
+ import android.support.design.widget.Snackbar;
164
+
165
+ import android.support.v7.app.AppCompatActivity;
166
+
167
+ import android.support.v7.widget.Toolbar;
168
+
169
+ import android.view.View;
170
+
171
+ import android.view.Menu;
172
+
173
+ import android.view.MenuItem;
174
+
175
+ import android.widget.Button;
176
+
177
+ import android.widget.EditText;
178
+
179
+ import android.widget.LinearLayout;
180
+
181
+ import android.widget.TextView;
182
+
183
+
184
+
185
+ public class ChatActivity extends AppCompatActivity {
186
+
187
+
188
+
189
+ private EditText mInputMessage;
190
+
191
+ private Button mSendMessage;
192
+
193
+ private LinearLayout mMessageLog;
194
+
195
+ private TextView mCpuMessage;
196
+
197
+ private TextView mUserMessage;
198
+
199
+
200
+
201
+ @Override
202
+
203
+ protected void onCreate(Bundle savedInstanceState) {
204
+
205
+ super.onCreate(savedInstanceState);
206
+
207
+ setContentView(R.layout.activity_chat);
208
+
209
+
210
+
211
+
212
+
213
+
214
+
215
+ mInputMessage=(EditText)findById(R.id.input_message);//ユーザーが入力するフィールド
216
+
217
+ mSendMessage=(Button)findViewById(R.id.send_message);//SENDボタン
218
+
219
+ mMessageLog=(LinearLayout)findViewById(R.id.message_log);//入力履歴を表示するレイアウト
220
+
221
+ mCpuMessage=(TextView)findViewById(R.id.cpu_message);//コンピューターからの応答
222
+
223
+ mUserMessage=(TextView)findViewById(R.id.user_message);//ユーザーが入力した内容
224
+
225
+ mInputMessage.setText("hoge");
226
+
227
+ Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);
228
+
229
+ setSupportActionBar(toolbar);
230
+
231
+ }
232
+
233
+ @Override
234
+
235
+ public boolean onCreateOptionsMenu(Menu menu) {
236
+
237
+ // Inflate the menu; this adds items to the action bar if it is present.
238
+
239
+ getMenuInflater().inflate(R.menu.menu_chat, menu);
240
+
241
+ return true;
242
+
243
+ }
244
+
245
+
246
+
247
+ @Override
248
+
249
+ public boolean onOptionsItemSelected(MenuItem item) {
250
+
251
+ // Handle action bar item clicks here. The action bar will
252
+
253
+ // automatically handle clicks on the Home/Up button, so long
254
+
255
+ // as you specify a parent activity in AndroidManifest.xml.
256
+
257
+ int id = item.getItemId();
258
+
259
+
260
+
261
+ //noinspection SimplifiableIfStatement
262
+
263
+ if (id == R.id.action_settings) {
264
+
265
+ return true;
266
+
267
+ }
268
+
269
+
270
+
271
+ return super.onOptionsItemSelected(item);
272
+
273
+ }
274
+
275
+ }
276
+
277
+
278
+
279
+ ```
280
+
151
281
  このstartだけカラーにならないのですが、何が問題なのでしょうか?
152
282
 
153
283
  どうぞよろしくお願いします。

2

コードの変更

2016/05/11 07:15

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -14,7 +14,91 @@
14
14
 
15
15
  ```java
16
16
 
17
+ <?xml version="1.0" encoding="utf-8"?>
18
+
19
+ <RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
20
+
21
+ xmlns:tools="http://schemas.android.com/tools"
22
+
23
+ xmlns:app="http://schemas.android.com/apk/res-auto"
24
+
25
+ android:layout_width="match_parent"
26
+
27
+ android:layout_height="match_parent"
28
+
29
+ android:paddingLeft="@dimen/activity_horizontal_margin"
30
+
31
+ android:paddingRight="@dimen/activity_horizontal_margin"
32
+
33
+ android:paddingTop="@dimen/activity_vertical_margin"
34
+
35
+ android:paddingBottom="@dimen/activity_vertical_margin"
36
+
37
+ app:layout_behavior="@string/appbar_scrolling_view_behavior"
38
+
39
+ tools:showIn="@layout/activity_chat"
40
+
41
+ tools:context=".ChatActivity">
42
+
43
+
44
+
45
+ <EditText
46
+
47
+ android:layout_width="wrap_content"
48
+
49
+ android:layout_height="wrap_content"
50
+
51
+ android:id="@+id/input_message"
52
+
53
+ android:layout_alignParentTop="true"
54
+
55
+ android:layout_alignParentLeft="true"
56
+
57
+ android:layout_alignParentStart="true"
58
+
59
+ android:layout_toLeftOf="@+id/send_message"
60
+
61
+ android:layout_toStartOf="@+id/send_message" />
62
+
63
+
64
+
65
+ <Button
66
+
67
+ android:layout_width="wrap_content"
68
+
69
+ android:layout_height="wrap_content"
70
+
71
+ android:text="SEND"
72
+
73
+ android:id="@+id/send_message"
74
+
75
+ android:layout_alignParentTop="true"
76
+
77
+ android:layout_alignParentRight="true"
78
+
79
+ android:layout_alignParentEnd="true" />
80
+
81
+
82
+
83
+ <LinearLayout
84
+
85
+ android:orientation="vertical"
86
+
87
+ android:layout_width="fill_parent"
88
+
89
+ android:layout_height="fill_parent"
90
+
91
+ android:layout_below="@+id/input_message"
92
+
93
+ android:layout_alignParentLeft="true"
94
+
95
+ android:layout_alignParentStart="true"
96
+
97
+ android:id="@+id/message_log">
98
+
99
+
100
+
17
- <TextView
101
+ <TextView
18
102
 
19
103
  android:layout_width="wrap_content"
20
104
 
@@ -22,9 +106,31 @@
22
106
 
23
107
  android:text="こんにちは"
24
108
 
25
- android:id="@+id/cpu_message" />
109
+ android:id="@+id/cpu_message"
26
110
 
27
111
  android:layout_gravity="start"/>
112
+
113
+
114
+
115
+ <TextView
116
+
117
+ android:layout_width="wrap_content"
118
+
119
+ android:layout_height="wrap_content"
120
+
121
+ android:text=""
122
+
123
+ android:id="@+id/user_message"
124
+
125
+ android:layout_gravity="end" />
126
+
127
+ </LinearLayout>
128
+
129
+
130
+
131
+ </RelativeLayout>
132
+
133
+
28
134
 
29
135
 
30
136
 

1

からだった所に追加

2016/05/11 06:37

投稿

edoooooo
edoooooo

スコア476

test CHANGED
File without changes
test CHANGED
@@ -34,7 +34,9 @@
34
34
 
35
35
  ```java
36
36
 
37
+ Error:Execution failed for task ':chatapplication:processDebugResources'.
37
38
 
39
+ > com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/Users/endoutaichi/Library/Android/sdk/build-tools/23.0.3/aapt'' finished with non-zero exit value 1
38
40
 
39
41
  ```
40
42