2016-07-22 7 views
0

angewendet werden ich die folgende Fehlermeldung empfangen:Konstruktor CountDownTimer in Klasse CountDownTimer kann nicht auf bestimmte Typen

Error:(104, 51) error: constructor CountDownTimer in class CountDownTimer cannot be applied to given types; 
    required: long,long 
    found: no arguments 
    reason: actual and formal argument lists differ in length 

Hier mein Code:

class C06964 extends CountDownTimer { 

    /* renamed from: com.aplikasi.gokil.MyActivity.4.1 */ 
    class C06941 extends CountDownTimer { 
     final /* synthetic */ Toast val$toast; 

     C06941(long x0, long x1, Toast toast) { 
      this.val$toast = toast; 
      super(x0, x1); 
     } 

     public void onTick(long millisUntilFinished) { 
      this.val$toast.show(); 
     } 

     public void onFinish() { 
      this.val$toast.cancel(); 
     } 
    } 

    /* renamed from: com.aplikasi.gokil.MyActivity.4.2 */ 
    class C06952 extends CountDownTimer { 
     final /* synthetic */ Toast val$toast; 

     C06952(long x0, long x1, Toast toast) { 
      this.val$toast = toast; 
      super(x0, x1); 
     } 

     public void onTick(long millisUntilFinished) { 
      this.val$toast.show(); 
     } 

     public void onFinish() { 
      this.val$toast.cancel(); 
      MyActivity.this.startActivity(IntentCompat.makeRestartActivityTask(MyActivity.this.getPackageManager().getLaunchIntentForPackage(MyActivity.this.getPackageName()).getComponent())); 
      System.exit(0); 
     } 
    } 

    C06964(long x0, long x1) { 
     super(x0, x1); 
    } 

    public void onTick(long millisUntilFinished) { 
     ((TextView) MyActivity.this.findViewById(id.textView)).setText("Restart Application In : " + (millisUntilFinished/1000)); 
     Toast toast = Toast.makeText(MyActivity.this.getBaseContext(), "Restart Application In : " + (millisUntilFinished/1000), 0); 
     toast.show(); 
     new C06941(1000, 1000, toast).start(); 
    } 

    public void onFinish() { 
     Toast toast = Toast.makeText(MyActivity.this.getBaseContext(), "Restarting Application...", 0); 
     toast.show(); 
     ((TextView) MyActivity.this.findViewById(id.textView)).setText("Restarting Application..."); 
     new C06952(3000, 3000, toast).start(); 
    } 
} 

Kann jemand erklären, warum ich diesen Fehler erhalte?

Antwort

3

Invocation of a superclass constructor must be the first line in the subclass constructor. - Using the Keyword super

Ihre cunstructors fordern super(x0, x1) nach this.val$toast = toast Einstellung.

Verwandte Themen