![](http://oshiete.xgoo.jp/images/v2/pc/qa/question_title.png?5a7ff87)
自分は今、本を読みながらandroidプログラミングの勉強をしています。
XMLファイルをよく見直して間違いは見当たらないのですが
起動しようとすると「your project contains error」と表示されます。
コンソールには「No resource found that matches the given name (at 'title' with value '@string/menu_settings')」と書いてあります。
ネットで調べたらソースをクリーンすればいいと書いてありましたが
クリーンすると今度はjavaファイルにエラーが起きます。
以下が自分が打ち込んだXMLのソースコードです。
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<TextView android:text="お申込みフォーム"
android:textAppearance="?android:attr/textAppearanceLarge"
android:layout_width="fill_parent"
android:layout_height="wrap_content"/>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:text="お名前 :"
android:layout_width="70sp"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/name"
android:layout_width="200dp"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:text="住所 :"
android:layout_width="70sp"
android:layout_height="wrap_content"/>
<EditText
android:id="@+id/address"
android:layout_width="200dp"
android:layout_height="wrap_content"/>
</LinearLayout>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="wrap_content">
<TextView
android:text="生年月日 :"
android:layout_width="70sp"
android:layout_height="wrap_content"/>
<Spinner
android:id="@+id/month"
android:entries="@array/month"
android:layout_width="85dp"
android:layout_height="wrap_content"/>
<TextView
android:text="月"
android:layout_width="20sp"
android:layout_height="wrap_content"/>
<Spinner
android:id="@+id/day"
android:entries="@array/day"
android:layout_width="85dp"
android:layout_height="wrap_content"/>
<TextView
android:text="日"
android:layout_width="20sp"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
どうかよろしくお願い致します。
No.2ベストアンサー
- 回答日時:
No.1です。
それをそのまま書いてもダメです。
strings.xmlとは何を書くものなのか、お持ちの本をご確認ください。
この回答への補足
度々すいません。
本を読んだのですがよくわかりませんでした。
ネット上で調べたりして色々試したりもしました。
どう書き込んだらいいか教えていただけませんでしょうか。
すいません。
もっとよく調べたら解決できました。
やっとプログラムが起動しました。
とても参考になりました。
ありがとうございます。
No.1
- 回答日時:
出力されてる、
No resource found that matches the given name (at 'title' with value '@string/menu_settings')
の意味はお分かりですか?
strings.xmlにmenu_settingsが記述されていますか?
お書きになったXMLにはないようなので、別ファイルで記述されているかもしれませんが。。。
この回答への補足
menuフォルダの中に
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:id="@+id/menu_settings"
android:title="@string/menu_settings"
android:orderInCategory="100" />
</menu>
という記述がありました。
この記述をstring.xmlに加えればいいのでしょうか?
お探しのQ&Aが見つからない時は、教えて!gooで質問しましょう!
似たような質問が見つかりました
- アプリ Android studio 初心者 Hello Android!しか表示されない 1 2023/08/01 08:47
- Android この画像をダウンロードできませんでした。 原因はなんででしょうか?? どんな手段を使ってもダウンロー 3 2023/01/26 18:40
- HTML・CSS CSS のみのタブ切り替えについて 1 2023/01/11 16:47
- HTML・CSS html/cssで要素が出てこなくて困ってます 1 2022/12/31 16:59
- Bluetooth・テザリング Windows11PCとAndroidスマホのUSBテザリングで繋げるネット環境が繋がらなくなった。 1 2023/02/05 15:57
- Android(アンドロイド) Android端末のAppleIDを変更したい Androidのスマホ(Xperia)にAppleM 3 2023/04/03 11:50
- その他(スマートフォン・携帯電話・VR) iPhoneについて質問ですが10年前なら確かにiPhoneの方が良かったと思いますが今の時代に上か 6 2022/04/01 18:44
- Android(アンドロイド) 標準ブラウザがAndroidシステムWebviewのブラウザになってるAndroid端末を教えてくだ 2 2022/12/02 12:35
- Android 最近のAndroidって思い通りに操れないのでしょうか?? Facebookのアプリから画像のURL 2 2022/09/18 16:23
- VPN 何これ 1 2022/04/19 01:32
関連するカテゴリからQ&Aを探す
デイリーランキングこのカテゴリの人気デイリーQ&Aランキング
-
androidプログラムのエラーにつ...
-
Android開発(switch文)について
-
Google8とiPhoneseどっちを、買...
-
クラシルリワード って、旧スマ...
-
dアカウントのこの端末登録名っ...
-
親名義でスマホをdocomo契約し...
-
格安スマホ複数持ちでのポイ活...
-
Googleフォトにバックアップし...
-
電波マークが2つあるのですが、...
-
Fireタブレットで、この「端末...
-
アンドロイド版モンスト 動作重...
-
機種変更する時の、Googleアカ...
-
ahamoでデザリングを使う操作を...
-
最近スマホの調子がおかしいで...
-
Androidアプリ、auとdocomo別々?
-
端末からhtmlファイルをブラウ...
-
PCからスマホ端末保存による情...
-
機種変更しようか迷ってます。 ...
-
xperiaのsov36と、so01kの違い...
-
ワイモバイルスマホ、フィルタ...
マンスリーランキングこのカテゴリの人気マンスリーQ&Aランキング
-
androidアプリ開発 -間違い探...
-
androidプログラムのエラーにつ...
-
android.os.Systemをimport
-
Musicカウントフリー適用外?
-
canvas を android で見ると...?
-
android AVDからネットワーク接続
-
Androidプログラムについて
-
エミュレーターでAndroidMarket...
-
スクショを消さずにスマホに残...
-
perlでアクセス端末の解像度を...
-
バージョンアップ後の不具合
-
Android開発(switch文)について
-
さっき、YouTubeをandroidでみ...
-
Android開発の初心者です。分か...
-
スマホアプリ、GANMAが、ば―ジ...
-
Androidアプリ 通信について
-
Googleフォトにバックアップし...
-
Androidスマートフォンについて...
-
クラシルリワード って、旧スマ...
-
SIMフリーとはなにか
おすすめ情報