这是我的代码
public class MainActivity extends Activity {
Button btn;
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
btn = (Button) findViewById(R.id.button1);
btn.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
Intent intent = new Intent(MainActivity.this,
socialnetworking.class);
startActivity(intent);
}
});
}
}
但我从我的控制台收到此消息:
[2013-05-17 17:57:44 - NXTRemoteControl] ------------------------------
[2013-05-17 17:57:44 - NXTRemoteControl] Android Launch!
[2013-05-17 17:57:44 - NXTRemoteControl] adb is running normally.
[2013-05-17 17:57:44 - NXTRemoteControl] Performing com.example.nxtremotecontrol.MainActivity activity launch
[2013-05-17 17:57:44 - NXTRemoteControl] Automatic Target Mode: using existing emulator 'emulator-5554' running compatible AVD 'GalaxyNexus'
[2013-05-17 17:57:46 - NXTRemoteControl] Application already deployed. No need to reinstall.
[2013-05-17 17:57:46 - NXTRemoteControl] Starting activity com.example.nxtremotecontrol.MainActivity on device emulator-5554
[2013-05-17 17:57:47 - NXTRemoteControl] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.example.nxtremotecontrol/.MainActivity }
[2013-05-17 17:57:47 - NXTRemoteControl] ActivityManager: Warning: Activity not started, its current task has been brought to the front
答案 0 :(得分:0)
模拟器只是告诉你
如果您需要刷新它,可以