0

I read Hello Android book and I have problem with one exercise in book. I copied and pasted the code from book to activity_main.xml (res/layout) and strings.xml (res/values), but the error i'm seeing is Unparsed aapt error(s)!Check the console for Sudoku.

I googled and i don't answer I read the links of stackoverflow but my problem is not solved.

activity_main.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:layout_width="fill_parent"  
android:layout_height="wrap_content"  
android:text="@string/main_title" />  
<Button  
android:layout_width="fill_parent"  
android:layout_height="wrap_content"  
android:text="@string/continue_label" />  
<Button  
android:layout_width="fill_parent"  
android:layout_height="wrap_content"  
android:text="@string/new_game_label" />  
<Button  
android:layout_width="fill_parent"  
android:layout_height="wrap_content"  
android:text="@string/about_label" />  
<Button  
android:layout_width="fill_parent"  
android:layout_height="wrap_content"  
android:text="@string/exit_label" /> 
</LinearLayout>

strings.xml

<?xml version="1.0" encoding="utf-8"?>  
<resources>  
<string name="app_name">Sudoku</string>  
<string name="main_title">Android Sudoku</string>  
<string name="continue_label">Continue</string>  
<string name="new_game_label">New Game</string>  
<string name="about_label">About</string>  
<string name="exit_label">Exit</string>  
</resources>

I read console tab, I get more information about the program:

Bad XML block: header size 91 or total size 0 is larger than data size 0
error: Error: No resource found that matches the given name (at 'title' with value '@string/menu_settings').

I can't solve this problem. Can someone please help me?

Brad Larson
  • 170,088
  • 45
  • 397
  • 571
change world
  • 67
  • 3
  • 10

1 Answers1

0

Add this to your strings.xml:

<string name="menu_settings">Your text</string>

It seems you are accessing a string which is not defined.

Kiril
  • 6,009
  • 13
  • 57
  • 77