chandra chandra - 3 months ago 12x
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.


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