こんにちは私のEclipse Androidプロジェクトでは、options.xmlという名前のxmlファイルを追加しようとすると、Rが消えます。これは私がしたことです.resフォルダーの下に、Eclipseの追加オプションを使用してメニューフォルダーを作成しました。その名前の options.xml の下に xml ファイルを作成しました。その内容は次のとおりです。
<menu xmlns:android="http://schemas.android.com/apk/res/android">
<item android:title="Take Picture" android:id="@+id/camera" android:icon="@drawable/ic_menu_camera" android:showAsAction="ifRoom"></item>
</menu>
しかし、そのR.javaを追加しようとすると、自動生成から消えます。ぜんぜんわかりません。私は日食を閉じて再開し、新しいプロジェクトを試してみましたが、うまくいきませんでした。
私のレイアウトmain.xml、
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:orientation="horizontal">
<SurfaceView xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/preview"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
メニューフォルダを削除するとRが表示されます。