title: Trouble launching new Android activity
body: <p>I'm having some trouble with launching a new Android activity with code written in Eclipse. I am trying to launch my PrinterDriver activity from my main activity named HomeActivity. However, it crashes and I'm not sure why.</p>
  
  <p>The code in HomeActivity is</p>
  
  <pre><code>public void PrintMessage(StringBuilder sb) {
      Intent intent = new Intent(this, PrinterDriver.class);
      String message = sb.toString();
      intent.putExtra("PrintableString", message);
      startActivity(intent);
  }
  </code></pre>
  
  <p>The code in PrinterDriver is</p>
  
  <pre><code>protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);
      setContentView(R.layout.printing);
      Intent intent = getIntent();
      String sb = intent.getExtras().getString("PrintableString");
      new AlertDialog.Builder(PrinterDriver.this).setMessage(sb.toString()).show();
  </code></pre>
  
  <p>}</p>
  
  <p>My manifest file code for PrinterDriver activity is</p>
  
  <pre><code>    &lt;activity android:name="com.handpoint.headstart.android.PrinterDriver"
                android:theme="@android:style/Theme.Dialog"
                android:screenOrientation="portrait"
                &gt;
          &lt;intent-filter&gt;
              &lt;action android:name="com.handpoint.headstart.android.PrinterDriver" /&gt;
              &lt;category android:name="android.intent.category.DEFAULT" /&gt;
          &lt;/intent-filter&gt;
      &lt;/activity&gt;
  </code></pre>
  
  <p>The code never seems to get as far as the onCreate method in PrinterDriver. I've placed a breakpoint at the startActivity function and it's getting to there OK but no further. In the Eclipse Debug environment I get the message, "the jar file c:\google android sdk\platforms\android-14\android.jar has no source attachment".</p>
  
  <p>Where am I going wrong here?</p>
  
  <p>Thanks in advance for your help</p>
  
  <p>Edit:</p>
  
  <p>My log cat error messages:</p>
  
  <pre><code>11-12 14:25:13.933: E/QcrilMsgTunnelSocket(10629): IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
  11-12 14:25:15.875: E/MP-Decision(1702): num online cores: 1 reqd : 2 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 68
  11-12 14:25:15.875: E/MP-Decision(1702): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
  11-12 14:25:16.476: E/MP-Decision(1702): num online cores: 2 reqd : 1 available : 4 rq_depth:0.000000 hotplug_avg_load_dw: 29
  11-12 14:25:16.476: E/MP-Decision(1702): DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:196.000000
  11-12 14:25:17.287: E/MP-Decision(1702): num online cores: 1 reqd : 2 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 62
  11-12 14:25:17.287: E/MP-Decision(1702): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
  11-12 14:25:17.727: E/MP-Decision(1702): num online cores: 2 reqd : 1 available : 4 rq_depth:0.000000 hotplug_avg_load_dw: 11
  11-12 14:25:17.727: E/MP-Decision(1702): DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:196.000000
  11-12 14:25:17.937: E/QcrilMsgTunnelSocket(10629): IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
  11-12 14:25:19.048: E/AndroidRuntime(11031): FATAL EXCEPTION: main
  11-12 14:25:19.048: E/AndroidRuntime(11031): android.content.ActivityNotFoundException: Unable to find explicit activity class {com.handpoint.headstart.sample/com.handpoint.headstart.sample.PrinterDriver}; have you declared this activity in your AndroidManifest.xml?
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1635)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.app.Instrumentation.execStartActivity(Instrumentation.java:1434)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.app.Activity.startActivityForResult(Activity.java:3430)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.app.Activity.startActivityForResult(Activity.java:3391)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.app.Activity.startActivity(Activity.java:3626)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.app.Activity.startActivity(Activity.java:3594)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at com.handpoint.headstart.sample.ui.HomeActivity.PrintMessage(HomeActivity.java:1100)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at com.handpoint.headstart.sample.ui.HomeActivity$10$1.onClick(HomeActivity.java:1082)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at com.android.internal.app.AlertController$AlertParams$3.onItemClick(AlertController.java:976)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.widget.AdapterView.performItemClick(AdapterView.java:301)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.widget.AbsListView.performItemClick(AbsListView.java:1519)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.widget.AbsListView$PerformClick.run(AbsListView.java:3291)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.widget.AbsListView$1.run(AbsListView.java:4340)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.os.Handler.handleCallback(Handler.java:725)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.os.Handler.dispatchMessage(Handler.java:92)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.os.Looper.loop(Looper.java:137)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at android.app.ActivityThread.main(ActivityThread.java:5328)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at java.lang.reflect.Method.invokeNative(Native Method)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at java.lang.reflect.Method.invoke(Method.java:511)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
  11-12 14:25:19.048: E/AndroidRuntime(11031):    at dalvik.system.NativeStart.main(Native Method)
  11-12 14:25:19.389: E/MP-Decision(1702): num online cores: 1 reqd : 2 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 53
  11-12 14:25:19.389: E/MP-Decision(1702): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
  11-12 14:25:19.409: E/android.os.Debug(780): !@Dumpstate &gt; sdumpstate -k -t -z -d -o /data/log/dumpstate_app_error
  11-12 14:25:19.789: E/MP-Decision(1702): num online cores: 2 reqd : 1 available : 4 rq_depth:1.000000 hotplug_avg_load_dw: 11
  11-12 14:25:19.789: E/MP-Decision(1702): DOWN cpu:1 core_idx:1 Ns:1.100000 Ts:190 total_time_down:49.000000
  11-12 14:25:20.710: E/MP-Decision(1702): num online cores: 1 reqd : 2 available : 4 rq_depth:2.500000 hotplug_avg_load_dw: 49
  11-12 14:25:20.710: E/MP-Decision(1702): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:147.000000
  11-12 14:25:20.910: E/MP-Decision(1702): num online cores: 2 reqd : 3 available : 4 rq_depth:2.700000 hotplug_avg_load_dw: 79
  11-12 14:25:20.910: E/MP-Decision(1702): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
  11-12 14:25:20.910: E/MP-Decision(1702): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:137.000000
  11-12 14:25:21.161: E/MP-Decision(1702): num online cores: 3 reqd : 2 available : 4 rq_depth:1.300000 hotplug_avg_load_dw: 66
  11-12 14:25:21.161: E/MP-Decision(1702): DOWN cpu:2 core_idx:2 Ns:2.100000 Ts:240 total_time_down:242.000000
  11-12 14:25:21.761: E/QSEECOMAPI:(11198): Error::Failed to open /dev/qseecom device
  11-12 14:25:21.761: E/QSEECOMAPI:(11198): Error::Failed to open /dev/qseecom device
  11-12 14:25:21.761: E/QSEECOMAPI:(11198): Error::Failed to open /dev/qseecom device
  11-12 14:25:21.761: E/QSEECOMAPI:(11198): Error::Failed to open /dev/qseecom device
  11-12 14:25:21.761: E/QSEECOMAPI:(11198): Error::Failed to open /dev/qseecom device
  11-12 14:25:21.931: E/QcrilMsgTunnelSocket(10629): IOExceptionjava.io.IOException: No such file or directoryReason: No such file or directory
  11-12 14:25:22.562: E/MP-Decision(1702): num online cores: 2 reqd : 3 available : 4 rq_depth:3.300000 hotplug_avg_load_dw: 101
  11-12 14:25:22.562: E/MP-Decision(1702): UP cpu:1 core_idx:1 Nw:1.900000 Tw:140 total_time_up:0.000000
  11-12 14:25:22.562: E/MP-Decision(1702): UP cpu:2 core_idx:2 Nw:2.700000 Tw:90 total_time_up:98.000000
  </code></pre>