java.lang.RuntimeException: Unable to start activity (android 2.2)
<p>I don't known why, on android 2.2 if I rotate emulator I get this error. While on android 2.1 rotating after 5/6 times I've outofmemory. What kind of error is it? And why there're so many different errors from one to other android versions?</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    xmlns:android1="http://schemas.android.com/apk/res/android"
    android:id="@+id/background"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@drawable/meditazione2"
    android:orientation="vertical" &gt;



    &lt;LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="horizontal" &gt;



        &lt;SeekBar
            android:id="@+id/seekBar1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1" /&gt;

    &lt;/LinearLayout&gt;


    &lt;ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:layout_weight="1.0"
        android:fillViewport="true" &gt;



        &lt;TextView
            android:id="@+id/textView1"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:autoLink="web|email"
            android:text="TextView"
             /&gt;


    &lt;/ScrollView&gt;



    &lt;LinearLayout
        xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical" &gt;

        &lt;TextView
            android:id="@+id/textView2"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_weight="1"
            android:text="TextView2"
            android:textSize="14dp"
            android:textStyle="italic" /&gt;



        &lt;LinearLayout
            xmlns:android="http://schemas.android.com/apk/res/android"
            xmlns:tools="http://schemas.android.com/tools"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="horizontal" &gt;

            &lt;Button
                android:id="@+id/button1"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center_horizontal"
                android:layout_weight="1"
                android:background="@drawable/frecciasx"

                android:text="" /&gt;

            &lt;Button
                android:id="@+id/button4"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@drawable/libroantico2"
                android:text="" /&gt;

            &lt;Button
                android:id="@+id/button2"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_weight="1"
                android:background="@drawable/frecciadx"
                android:text="" /&gt;


            &lt;/LinearLayout&gt;

    &lt;/LinearLayout&gt;

&lt;/LinearLayout&gt;    

      E/AndroidRuntime(  296): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.app/com.example.app.MainActivity}: android.view.InflateException: Binary XML file line #21: Error inflating class &lt;unknown&gt;
        E/AndroidRuntime(  296):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663)
        E/AndroidRuntime(  296):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
        E/AndroidRuntime(  296):    at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:3815)
        E/AndroidRuntime(  296):    at android.app.ActivityThread.access$2400(ActivityThread.java:125)
        E/AndroidRuntime(  296):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2037)
        E/AndroidRuntime(  296):    at android.os.Handler.dispatchMessage(Handler.java:99)
        E/AndroidRuntime(  296):    at android.os.Looper.loop(Looper.java:123)
        E/AndroidRuntime(  296):    at android.app.ActivityThread.main(ActivityThread.java:4627)
        E/AndroidRuntime(  296):    at java.lang.reflect.Method.invokeNative(Native Method)
        E/AndroidRuntime(  296):    at java.lang.reflect.Method.invoke(Method.java:521)
    com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
    com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
        E/AndroidRuntime(  296):    at dalvik.system.NativeStart.main(Native Method)
        E/AndroidRuntime(  296): Caused by: android.view.InflateException: Binary XML file line #21: Error inflating class &lt;unknown&gt;
    android.view.LayoutInflater.createView(LayoutInflater.java:513)
    com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
    android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:563)
    android.view.LayoutInflater.inflate(LayoutInflater.java:385)
    android.view.LayoutInflater.inflate(LayoutInflater.java:320)
    android.view.LayoutInflater.inflate(LayoutInflater.java:276)
        E/AndroidRuntime(  296):    at android.widget.Toast.makeText(Toast.java:235)
    com.example.app.MainActivity.preferenze(MainActivity.java:3637)
    com.example.app.MainActivity.access$14(MainActivity.java:3635)
    com.example.app.MainActivity$24.onSharedPreferenceChanged(MainActivity.java:3993)
    android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.commit(ContextImpl.java:2830)
    com.example.app.MainActivity.preferenze(MainActivity.java:3746)
    com.example.app.MainActivity.access$14(MainActivity.java:3635)
    com.example.app.MainActivity$24.onSharedPreferenceChanged(MainActivity.java:3993)
    android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.commit(ContextImpl.java:2830)
    com.example.app.MainActivity.preferenze(MainActivity.java:3746)
    com.example.app.MainActivity.access$14(MainActivity.java:3635)
    com.example.app.MainActivity$24.onSharedPreferenceChanged(MainActivity.java:3993)
    android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.commit(ContextImpl.java:2830)
    com.example.app.MainActivity.preferenze(MainActivity.java:3746)
    com.example.app.MainActivity.access$14(MainActivity.java:3635)
    com.example.app.MainActivity$24.onSharedPreferenceChanged(MainActivity.java:3993)
    android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.commit(ContextImpl.java:2830)
    com.example.app.MainActivity.preferenze(MainActivity.java:3746)
    com.example.app.MainActivity.access$14(MainActivity.java:3635)
    com.example.app.MainActivity$24.onSharedPreferenceChanged(MainActivity.java:3993)
    android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.commit(ContextImpl.java:2830)
    com.example.app.MainActivity.preferenze(MainActivity.java:3746)
    com.example.app.MainActivity.access$14(MainActivity.java:3635)
    com.example.app.MainActivity$24.onSharedPreferenceChanged(MainActivity.java:3993)
    android.app.ContextImpl$SharedPreferencesImpl$EditorImpl.commit(ContextImpl.java:2830)
    com.example.app.MainActivity.preferenze(MainActivity.java:3746)
    com.example.app.MainActivity.access$14(MainActivity.java:3635)
    com.example.app.MainActivity$24.onSharedPreferenceChanged(MainAct
        W/ActivityManager(   59):   Force finishing activity com.example.app/.MainActivity
        W/ActivityManager(   59): Activity pause timeout for HistoryRecord{43f837d0 com.example.app/.MainActivity}
        D/dalvikvm(  119): GC_EXTERNAL_ALLOC freed 724 objects / 43752 bytes in 131ms
        D/dalvikvm(  119): GC_EXPLICIT freed 2045 objects / 94328 bytes in 62ms
        W/ActivityManager(   59): Activity destroy timeout for HistoryRecord{43f837d0 com.example.app/.MainActivity}
        D/SntpClient(   59): request time failed: java.net.SocketException: Address family not supported by protocol
        ^[[CI/Process (  296): Sending signal. PID: 296 SIG: 9
        I/ActivityManager(   59): Process com.example.app (pid 296) has died.
        I/WindowManager(   59): WIN DEATH: Window{43f034a8 Toast paused=false}
</code></pre>
