title: Android instantiate activity
body: <p>Hy
  I am new to Android programming and I try to add a secon activity to my AndroidManifest.xml
  But now my application isnt starting any more.
  The error is:</p>
  
  <pre><code>04-04 07:42:13.154: D/AndroidRuntime(809): Shutting down VM
  04-04 07:42:13.154: W/dalvikvm(809): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
  04-04 07:42:13.294: E/AndroidRuntime(809): FATAL EXCEPTION: main
  04-04 07:42:13.294: E/AndroidRuntime(809): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.example.evo_soft/com.example.evo_soft.MainActivity}: java.lang.NullPointerException
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.os.Handler.dispatchMessage(Handler.java:99)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.os.Looper.loop(Looper.java:137)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.app.ActivityThread.main(ActivityThread.java:5041)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at java.lang.reflect.Method.invokeNative(Native Method)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at java.lang.reflect.Method.invoke(Method.java:511)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at dalvik.system.NativeStart.main(Native Method)
  04-04 07:42:13.294: E/AndroidRuntime(809): Caused by: java.lang.NullPointerException
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.content.ContextWrapper.getPackageName(ContextWrapper.java:135)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.content.ComponentName.&lt;init&gt;(ComponentName.java:75)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.content.Intent.&lt;init&gt;(Intent.java:3491)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at com.example.evo_soft.MainActivity.&lt;init&gt;(MainActivity.java:220)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at java.lang.Class.newInstanceImpl(Native Method)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at java.lang.Class.newInstance(Class.java:1319)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
  04-04 07:42:13.294: E/AndroidRuntime(809):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
  04-04 07:42:13.294: E/AndroidRuntime(809):  ... 11 more
  </code></pre>
  
  <p>My AndroidManifest.xml </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.example.evo_soft"
  android:versionCode="1"
  android:versionName="1.0" &gt;
  
  &lt;uses-sdk
      android:minSdkVersion="12"
      android:targetSdkVersion="16" /&gt;
  &lt;uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/&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="com.example.evo_soft.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;activity 
          android:name="group.pals.android.lib.ui.filechooser.FileChooserActivity"
          android:configChanges="orientation|screenSize|keyboard|keyboardHidden"
          android:screenOrientation="user" &gt;
      &lt;/activity&gt;
  
      &lt;service android:name="group.pals.android.lib.ui.filechooser.services.LocalFileProvider"&gt;&lt;/service&gt;
  &lt;/application&gt;
  </code></pre>
  
  <p></p>
  
  <p>thanks for help</p>
  
  <p>Markus</p>