title: Simple android app crashes on startup
body: <p>I am creating a new Android app, but it crashes on startup (phone and emulator).</p>
  
  <p>Here is the code:</p>
  
  <p><strong>Arcig Manifest.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.tona.arcig"
      android:versionCode="1"
      android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="15"
      android:targetSdkVersion="17" /&gt;&lt;application android:allowBackup="true" android:icon="@drawable/ic_launcher" android:label="@string/app_name" android:theme="@style/AppTheme"&gt;
      &lt;activity android:name="MainActivity" android:label="@string/app_name"&gt;
          &lt;intent-filter&gt;
              &lt;action android:name="android.intent.action.MAIN" /&gt;
  
              &lt;category android:name="android.intent.category.LAUNCHER" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p><strong>Strings.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;resources&gt;
  
      &lt;string name="suplovani"&gt;Suplování&lt;/string&gt;
      &lt;string name="rozvrh"&gt;Rozvrh hodin&lt;/string&gt;
      &lt;string name="prihlasovani"&gt;Přihlašování do systému&lt;/string&gt;
      &lt;string name="email"&gt;Email&lt;/string&gt;
      &lt;string name="moodle"&gt;Moodle&lt;/string&gt;
      &lt;string name="kdm"&gt;KDM&lt;/string&gt;
      &lt;string name="o_aplikaci"&gt;O Aplikaci&lt;/string&gt;
      &lt;string name="app_name"&gt;Arcig.CZ&lt;/string&gt;
  
  &lt;/resources&gt;
  </code></pre>
  
  <p><strong>activity_main.xml</strong></p>
  
  <pre><code>    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:orientation="vertical" &gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="horizontal" &gt;
  
          &lt;ImageButton
              android:id="@+id/imageButton1"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:contentDescription="@string/suplovani"
              android:src="@drawable/suplovani" /&gt;
  
          &lt;ImageButton
              android:id="@+id/imageButton2"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:contentDescription="@string/rozvrh"
              android:src="@drawable/rozvrh" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
  
          &lt;ImageButton
              android:id="@+id/imageButton3"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:contentDescription="@string/prihlasovani"
              android:src="@drawable/prihlasovani" /&gt;
  
          &lt;ImageButton
              android:id="@+id/imageButton4"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:contentDescription="@string/email"
              android:src="@drawable/email" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content" &gt;
  
          &lt;ImageButton
              android:id="@+id/imageButton5"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:contentDescription="@string/email"
              android:src="@drawable/moodle" /&gt;
  
          &lt;ImageButton
              android:id="@+id/imageButton6"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:layout_weight="2"
              android:contentDescription="@string/kdm"
              android:src="@drawable/jidelna" /&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:orientation="vertical" &gt;
  
          &lt;ImageButton
              android:id="@+id/imageButton7"
              android:layout_width="wrap_content"
              android:layout_height="wrap_content"
              android:contentDescription="@string/o_aplikaci"
              android:src="@drawable/about" /&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p><strong>MainActivity.java</strong></p>
  
  <pre><code>package com.tona.arcig;
  
  import android.app.Activity;
  import android.os.Bundle;
  import android.view.View;
  import android.widget.Button;
  import android.widget.Toast;
  
  public class MainActivity extends Activity {
  
      @Override
      protected void onCreate(Bundle savedInstanceState) {
          super.onCreate(savedInstanceState);
          setContentView(R.layout.activity_main);
  
          addListenerOnButton();
      }
  
      public void addListenerOnButton() {
  
          Button button = (Button) findViewById(R.id.imageButton1);
          button.setOnClickListener(new View.OnClickListener() {
              public void onClick(View v) {
                  // Do something in response to button click
                  Toast.makeText(getApplicationContext(), "Mam rad vlaky", Toast.LENGTH_LONG).show();
              }
          });
      }
  }
  </code></pre>
  
  <p><strong>CONSOLE</strong></p>
  
  <pre><code>[2014-09-07 16:39:21 - Arcig] ------------------------------
  [2014-09-07 16:39:21 - Arcig] Android Launch!
  [2014-09-07 16:39:21 - Arcig] adb is running normally.
  [2014-09-07 16:39:21 - Arcig] Performing com.tona.arcig.MainActivity activity launch
  [2014-09-07 16:39:21 - Arcig] Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
  [2014-09-07 16:39:23 - Arcig] Application already deployed. No need to reinstall.
  [2014-09-07 16:39:23 - Arcig] Starting activity com.tona.arcig.MainActivity on device 0123456789ABCDEFG
  [2014-09-07 16:39:24 - Arcig] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.tona.arcig/.MainActivity }
  </code></pre>
  
  <p>When I execute the app, it just shows a crash message. :( Can anybody help me? Have I made any mistakes in the code?
  Thanks a lot guys</p>