2014-12-05 82 views
-1

這裏是程序代碼。請幫幫我。方法onStart(Context,int)未定義類型Object

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

應該'公共無效在onStart(意向意圖,詮釋paramInt)'not'public void onStart(Context paramIntent,i nt paramInt)' – Piyush 2014-12-05 10:30:00

回答

-1

@Piyush古普塔寫道:

它應該是:

public void onStart(Intent intent, int paramInt) 

public void onStart(Context paramIntent, int paramInt) 
+0

([在評論中回答並轉換爲社區wiki。](http://meta.stackoverflow.com/questions/251597/question-with-no-answers-but-issue-solved-in-在-評論)) – 2015-05-31 22:51:09

相關問題