-2

I tried cleaning and rebuilding my project but it didn't help. I also don't have any errors in my XML file. When I run the app it works but R class stays in red. Please help me.

Stack Danny
  • 7,754
  • 2
  • 26
  • 55
Shams
  • 388
  • 1
  • 2
  • 13

2 Answers2

1

It happens sometimes do:

File -> Invalidate Caches/Restart

Also "Sync with file system" or "Sync project with Gradle files" might help

Antonis Radz
  • 3,036
  • 1
  • 16
  • 34
0

Thanks guys. I solved this problem change gradle version. classpath 'com.android.tools.build:gradle:3.2.0' in build.gradle

Shams
  • 388
  • 1
  • 2
  • 13