Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent)
    text
    copied!<p>i designed a simple application in android but when i run it over emulator it shows application stopped...i tried to find solution and came across using breakpoints...but when i put breakpoints and debug the application it shows "source not found" in ddms perspective</p> <pre><code>ActivityThread.performLaunchActivity(ActivityThread$ActivityRecord, Intent). </code></pre> <p>can anybody out here suggest what i do now...</p> <p>this is what my log looks like</p> <pre><code>02-20 04:28:21.232: D/AndroidRuntime(607): Shutting down VM 02-20 04:28:21.232: W/dalvikvm(607): threadid=1: thread exiting with uncaught exception (group=0x4001d800) 02-20 04:28:21.262: E/AndroidRuntime(607): FATAL EXCEPTION: main 02-20 04:28:21.262: E/AndroidRuntime(607): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.apps/com.example.apps.Act}: java.lang.NullPointerException 02-20 04:28:21.262: E/AndroidRuntime(607): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2663) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.app.ActivityThread.access$2300(ActivityThread.java:125) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.os.Handler.dispatchMessage(Handler.java:99) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.os.Looper.loop(Looper.java:123) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.app.ActivityThread.main(ActivityThread.java:4627) 02-20 04:28:21.262: E/AndroidRuntime(607): at java.lang.reflect.Method.invokeNative(Native Method) 02-20 04:28:21.262: E/AndroidRuntime(607): at java.lang.reflect.Method.invoke(Method.java:521) 02-20 04:28:21.262: E/AndroidRuntime(607): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868) 02-20 04:28:21.262: E/AndroidRuntime(607): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626) 02-20 04:28:21.262: E/AndroidRuntime(607): at dalvik.system.NativeStart.main(Native Method) 02-20 04:28:21.262: E/AndroidRuntime(607): Caused by: java.lang.NullPointerException 02-20 04:28:21.262: E/AndroidRuntime(607): at com.example.apps.Act.onCreate(Act.java:16) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) 02-20 04:28:21.262: E/AndroidRuntime(607): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2627) 02-20 04:28:21.262: E/AndroidRuntime(607): ... 11 more 02-20 04:28:31.283: I/Process(607): Sending signal. PID: 607 SIG: 9 </code></pre> <p>Activity class</p> <pre><code>package com.example.apps; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.EditText; public class Act extends Activity { Rest r=new Rest(); @Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); Button save=(Button)findViewById(R.id.save); save.setOnClickListener(onSave); } private View.OnClickListener onSave=new View.OnClickListener() { public void onClick(View v) { EditText name=(EditText)findViewById(R.id.name); EditText address=(EditText)findViewById(R.id.addr); r.setName(name.getText().toString()); r.setAddress(address.getText().toString()); } }; } </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload