TechInstituteのサンプルコード通りに記述しているのに、new**Handler()でエラーが起きます。
Class 'Anonymous class derived from Handler' must either be declared abstract or implement abstract method 'publish(LogRecord)' in 'Handler'
がエラー時に表示されたのですが、どうすれば解決するのでしょうか?
よろしくお願いいたします。
public GameView(Context context, AttributeSet attrs) { super(context, attrs); SurfaceHolder holder = getHolder(); holder.addCallback(this); gameThread = new GameThread(holder, context, **new Handler()**{ @Override public void handleMessage(Message msg){ handleMessage(msg); } }); }
あなたの回答
tips
プレビュー