お世話になっております。
Android studio 書籍にて独習中です。
下記のコードを書籍を映しましたがエラーになってしまいます。
どなたかエラー箇所を教えてください。
xml
1<?xml version="1.0" encoding = "utf=8" ?> 2<LinearLayout 3xmlns:android="http://schemas.android.com/apk/res/android" 4android:layout_width="match_parent" 5android:layout_height="match_parent" 6android:background="#A1A9BA" 7android:orientation="vertical"> 8 9<TextView 10 android:id="@+id/tvLabelInput" 11 android:layout_width="wrap_content" 12 android:layout_height="wrap_content" 13 android:layout_marginBottom="10dp" 14 android:layout_marginTop="5dp" 15 android:background="#ffffff" 16 android:text="@string/tv_msg" 17 android:textSize="25sp"/> 18</LinearLayout>
xml
1<?xml version="1.0" encoding="utf-8"?> 2<resources> 3 <string name="app_name">画面サンプル</string> 4 <string name="tv_msg">お名前を入力してください</string> 5</resources> 6
java
1package com.webserva.wings.android.viewsample; 2 3import android.support.v7.app.AppCompatActivity; 4import android.os.Bundle; 5 6public class MainActivity extends AppCompatActivity { 7 8 @Override 9 protected void onCreate(Bundle savedInstanceState) { 10 super.onCreate(savedInstanceState); 11 setContentView(R.layout.activity_main); 12 } 13} 14
error: XML declaration not well-formed.
というエラーが出てしまいます
大変お手数ですがご教示よろしくお願いいたします。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/07/13 07:20