android widget crashes java.lang.NullPointerException
<p>i have a problem with my widget:
this is the code:</p>

<pre><code>public class HelloWidget extends AppWidgetProvider {
public long t=0,lastUpdate=0;
public int scor1[],scor2[],teams,displayPage=0;
public String team1[],team2[];
Bitmap b1;

@Override
public void onUpdate(Context context, AppWidgetManager appWidgetManager,int[] appWidgetIds) {
    Timer timer = new Timer();
    timer.scheduleAtFixedRate(new MyTime(context, appWidgetManager), 1000, 10000);
}

private class MyTime extends TimerTask {
    RemoteViews remoteViews;
    AppWidgetManager appWidgetManager;
    ComponentName thisWidget;

    java.text.DateFormat format = SimpleDateFormat.getTimeInstance(SimpleDateFormat.MEDIUM,Locale.getDefault());

    public MyTime(Context context, AppWidgetManager appWidgetManager) {
        this.appWidgetManager = appWidgetManager;
        remoteViews = new RemoteViews(context.getPackageName(), R.layout.main);
        thisWidget = new ComponentName(context, HelloWidget.class);
    }

    @Override
    public void run() {
        remoteViews.setTextViewText(R.id.Clock,format.format(new Date()));

        checkUpdate();

        b1= BitmapFactory.decodeFile("/sdcard/crests/" + team1[displayPage*2] + ".png");
        b1=Bitmap.createScaledBitmap(b1, 54, 54, true);
        remoteViews.setImageViewBitmap(R.id.team11,b1);

        b1= BitmapFactory.decodeFile("/sdcard/crests/" + team2[displayPage*2] + ".png");
        b1=Bitmap.createScaledBitmap(b1, 54, 54, true);
        remoteViews.setImageViewBitmap(R.id.imageView4,b1);

        b1= BitmapFactory.decodeFile("/sdcard/crests/" + team1[displayPage*2 + 1] + ".png");
        b1=Bitmap.createScaledBitmap(b1, 54, 54, true);
        remoteViews.setImageViewBitmap(R.id.imageView3, b1);

        b1= BitmapFactory.decodeFile("/sdcard/crests/" + team2[displayPage*2 + 1] + ".png");
        b1=Bitmap.createScaledBitmap(b1, 54, 54, true);
        remoteViews.setImageViewBitmap(R.id.imageView2, b1);

        remoteViews.setTextViewText(R.id.textView4, team1[displayPage*2]);
        remoteViews.setTextViewText(R.id.textView1, team2[displayPage*2]);
        remoteViews.setTextViewText(R.id.textView2, team1[displayPage*2 + 1]);
        remoteViews.setTextViewText(R.id.textView6, team2[displayPage*2 + 1]);

        remoteViews.setTextViewText(R.id.textView3, Integer.toString(scor1[displayPage*2]));
        remoteViews.setTextViewText(R.id.textView8, Integer.toString(scor2[displayPage*2]));
        remoteViews.setTextViewText(R.id.textView5, Integer.toString(scor1[displayPage*2 + 1]));
        remoteViews.setTextViewText(R.id.textView7, Integer.toString(scor2[displayPage*2 + 1]));
        appWidgetManager.updateAppWidget(thisWidget, remoteViews);
    }


}
</code></pre>

<p>but when i put it on the screen it force close. i get the following message in the logcat:
java.lang.NullPointerException
at HelloWidget$MyTime.run</p>

<p>what is the problem and how can i fix it?</p>
