chandra chandra - 1 year ago 103
Android Question

Why I am getting can not resolve symbol 'R'?

Why I am getting cannot resolve symbol 'R'..??.
When I'm creating new activity on that.Class file I'm getting this problem why I don't know after creation of class I did nothing. (in that R.layout.dashboard). ("R in red color").

public class DashboardActivity extends AppCompatActivity {
protected void onCreate(Bundle savedInstanceState) {

please help me.

Answer Source

I had the same issue before, can solve it by doing

Tools -> Android -> Sync Project with Gradle Files

Some times you need to restart android studio and reset the cache.

File -> Invalidate Caches / Restart
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download