public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.game);
Resources r = this.getResources();
Bundle bundle = getIntent().getExtras();
String host = bundle.getString("host");
int port = bundle.getInt("port");
connectToServer(host,port);
config(playerID);
}
config(playerID);这个函数一定要设置断点,在Debug里执行才能成功执行。不设置断点,貌似就跳过了,在下面的断点检查它赋值的变量时,发现完全没赋值。只有在Debug模式下才能赋值啊,这是怎么回事?愁死了……
super.onCreate(savedInstanceState);
requestWindowFeature(Window.FEATURE_NO_TITLE);
setContentView(R.layout.game);
Resources r = this.getResources();
Bundle bundle = getIntent().getExtras();
String host = bundle.getString("host");
int port = bundle.getInt("port");
connectToServer(host,port);
config(playerID);
}
config(playerID);这个函数一定要设置断点,在Debug里执行才能成功执行。不设置断点,貌似就跳过了,在下面的断点检查它赋值的变量时,发现完全没赋值。只有在Debug模式下才能赋值啊,这是怎么回事?愁死了……
试了好几次了,这bug非常不科学!我现在调试剩下的程序就必须在前面设上断点啊……不然数据不对,后面程序不能执行。