0
  1. 这是我的代码

    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);    
            }
        });    
    }    
    

    }

  2. 但我从我的控制台收到这条消息:

        [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
    
    1. 我有点困惑它被带到前面意味着什么,以及整个事情
4

1 回答 1

0

模拟器只是告诉你

  1. 您的应用程序已经在“设备”上
  2. 它无法检测到任何明显的变化
  3. 它已经在运行,因此只需要把它带到最前面

如果您需要刷新它,您可以

  • 卸载它并重新开始运行
  • 更改它并再次开始运行它或
  • 清理您的项目并再次开始运行它
于 2013-05-17T22:44:38.917 回答