我将这一守则用于我的服务,但当我这样说时。
this.bindService(service, conn, flags);
我收到错误信息:syntax mis on token“}”,{预计到此之后......(1)
。
我的班子里的所有法典:
package com.flaxa.fixx;
import android.app.Activity;
import android.content.ComponentName;
import android.content.Intent;
import android.content.ServiceConnection;
import android.os.Bundle;
import android.os.IBinder;
import android.view.View;
public class MainActivity extends Activity {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
}
public void butonRunOnlyClickHandler(View target) {
Intent activity = new Intent(this, com.flax.trainer.RunOnly.class);
startActivity(activity);
}
public void butonChallengeClickHandler(View target) {
}
public void butonProgramClickHandler(View target) {
}
public void butonCalculatorClickHandler(View target) {
}
ServiceConnection conn = new ServiceConnection() {
@Override
public void onServiceDisconnected(ComponentName name) {
// TODO Auto-generated method stub
}
@Override
public void onServiceConnected(ComponentName name, IBinder service) {
// TODO Auto-generated method stub
}
this.bindService(new Intent("") , conn, Context.BIND_AUTO_CREATE);
};
}
有些人能否帮助我履行约束性服务职能?
增 编