Hello, I'm new with Xamarin. I need some help here, I tried to create a countdown timer. I already done that following some tutorial but there is a problem when i try to start the countdown
this is my error :
Unhandled Exception:
Java.Lang.ClassNotFoundException: Didn't find class "md5579855c995bdb073d8182511e793544c.MainActivity_CountDown" on path: DexPathList[[zip file "/data/app/App1.App1-1/base.apk"],nativeLibraryDirectories=[/data/app/App1.App1-1/lib/arm64, /data/app/App1.App1-1/base.apk!/lib/arm64-v8a, /vendor/lib64, /system/lib64]]
and this is my code :
private class CountDown : CountDownTimer
{
Context mContext = Application.Context;
MainActivity activity;
public CountDown(MainActivity activity, long totalTime, long interval) : base(totalTime, interval)
{
this.activity = activity;
}
public override void OnFinish()
{
}
public override void OnTick(long millisUntilFinished)
{
SharedPref sharedPref = new SharedPref(mContext);
long defaultTimer = sharedPref.GetTimer();
long milliseconds = defaultTimer / 1000;
long minutes = (long)(millisUntilFinished / (1000 * 60) % 60);
long seconds = (long)(millisUntilFinished / (1000) % 60);
activity.textViewTimer.Text = string.Format("{1:00}:{2:00}", minutes, seconds);
}
}
private void StartTimer()
{
SharedPref sharedPref = new SharedPref(mContext);
long defaultTimer = sharedPref.GetTimer();
CountDown count = new CountDown(this, defaultTimer, 1000);
count.Start();
}
I got the error in here :
base(totalTime, interval)
I really appreciate if you guys can help me. Thank you.