每当我尝试单击按钮时都会出现此错误:
public class NncActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
Button b = (Button) findViewById(R.id.loginButton);
b.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View v) {
startActivity(new Intent(NncActivity.this, Status.class));
}
});
}
}
我已经添加了
<activity android:name=".Status"></activity>
在第一个之后到清单,</activity>
但我仍然收到那个错误!
有人知道为什么吗?
这就是 Logcat 显示的内容
> threadid=1: thread exiting with uncaught exception (group=0x40015560)
FATAL EXCEPTION: main
android.content.ActivityNotFoundException: Unable to find explicit activity class {nco.surt/android.net.wifi.WifiConfiguration$Status}; have you declared this activity in your AndroidManifest.xml?
at android.app.Instrumentation.checkStartActivityResult(Instrumentation.java:1405)
at android.app.Instrumentation.execStartActivity(Instrumentation.java:1379)
at android.app.Activity.startActivityForResult(Activity.java:2827)
at android.app.Activity.startActivity(Activity.java:2933)
at nco.surt.NncActivity$1.onClick(NncActivity.java:23)
at android.view.View.performClick(View.java:2485)
at android.view.View$PerformClick.run(View.java:9080)
at android.os.Handler.handleCallback(Handler.java:587)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:3683)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:507)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
at dalvik.system.NativeStart.main(Native Method)
请帮忙。