Android studio cannot import the R package, and the manual import shows red. Can run with no problem

I stepped on this problem twice before, so I recorded it.

The problem is: I can’t find R with my own package name in the project, and the manual import shows red, but it runs fine.

Tried Clean, Rebuild, Clear Cache, Reboot, all to no avail.

In the end, it was found that the package name was not specified in AndroidManifest.xml:

 

Just specify: package

Guess you like

Origin blog.csdn.net/Leo_Liang_jie/article/details/131613672