Cannot resolve symbol "postDelayed"
<p>I have an error:  Cannot resolve symbol &quot;postDelayed&quot;. In:</p>
<pre><code>handler.postDelayed(updateCurrentTime, 500);
</code></pre>
<p>This is some of my code:</p>
<pre><code>package com.example.hubert.myapplication;

import android.content.Intent;
import android.os.Bundle;
import android.os.Handler;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.TextView;

public class ClickActivity extends AppCompatActivity {
    Handler handler = new Handler();

    Runnable updateCurrentTime = new Runnable() {
        @Override
        public void run() {
            money = money + 100;
            handler.postDelayed(this, 1000);
        }
    };
    handler.postDelayed(updateCurrentTime, 500);
(...)
}
</code></pre>
<p>I read other similar questions and none of the answers are working for me.</p>