アンドロイドRはかなり長い間私を悩ませてきました。私の多くのプロジェクトでそれを見てきましたが、時々消えてしまうこともあれば、プロジェクトを再作成しなければならないこともあります。それでも、これは私の現在のプロジェクトでは何も解決しません。
論理的には、XMLファイルにエラーが含まれていると思われますが、それを見つけることができません。
私は開発環境としてEclipseを使用していますが、これは私の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="vertical" >
<ImageView
android:id="@+id/imgLogo"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:contentDescription="@string/title"
android:src="@drawable/ic_launcher" />
<TextView
android:id="@+id/textView1"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:text="@string/title"
android:textAppearance="?android:attr/textAppearanceLarge" />
<Button
android:id="@+id/btnNewTime"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/overview" />
<Button
android:id="@+id/btnOverview"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/overview" />
<Button
android:id="@+id/btnValues"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/values" />
<Button
android:id="@+id/btnExit"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/exit" />
</LinearLayout>
これは私のstrings.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="app_name">Werkregistratie</string>
<string name="title">Werkregistratie</string>
<string name="overview">Overzicht</string>
<string name="values">Salaris/reiskosten aanpassen</string>
<string name="exit">Afsluiten</string>
</resources>
私は問題を見つけることができないので、あなたが私を助けてくれることを本当に望んでいます。