Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/213.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 类型对象的onStart(Context,int)方法未定义_Android_Int_Oncreate_Android Context - Fatal编程技术网

Android 类型对象的onStart(Context,int)方法未定义

Android 类型对象的onStart(Context,int)方法未定义,android,int,oncreate,android-context,Android,Int,Oncreate,Android Context,这是程序代码。请帮帮我 public void onStart(Context paramIntent, int paramInt) { //super.onStart(paramIntent,paramInt);//ERROR IN THIS LINE this.dbhelper = new DBHelper(getApplicationContext()); this.db = this.dbhelper.getReadableDa

这是程序代码。请帮帮我

public void onStart(Context paramIntent, int paramInt)
      {
        //super.onStart(paramIntent,paramInt);//ERROR IN THIS LINE
        this.dbhelper = new DBHelper(getApplicationContext());
        this.db = this.dbhelper.getReadableDatabase();
        this.c = this.dbhelper.getPlaces(this.db);
        this.locManager = ((LocationManager)getSystemService("location"));
        this.db.close();
        this.am = ((AudioManager)getSystemService("audio"));
        if (this.locManager != null)
        {
          if (!this.locManager.isProviderEnabled("gps"))
          {
            startActivity(new Intent("android.settings.LOCATION_SOURCE_SETTINGS"));
            Toast.makeText(paramIntent, "Enable Gps!", 1).show();
          }
          this.locManager.requestLocationUpdates("gps", 300000L, 10.0F, this);
        }
      }
@皮尤斯·古普塔写道:

应该是:

 public void onStart(Intent intent, int paramInt)
不是

public void onStart(Context paramIntent, int paramInt)

它应该是
public void onStart(Intent-Intent,int-paramit)
而不是
public void onStart(Context-parametent,int-paramit)
()