IntelliJ IDEA – Can’t build anything, always get “package R does not exist”

I am brand new to IntelliJ so I apologize if this doesn’t work for you. I was experiencing the same problem and the solution was to add an Android Facet to your project.

(I am on a Mac, so directions here may be slightly off, and there are probably better ways to find this window, if so let me know!)

  1. Right click your project and go down to Open Module Settings (seems F4 also works)
  2. Select Facets in the far left column
  3. Click the + button
  4. Add an Android Facet to your project, and VOILA!
  5. You may need to import your Rs now, which could be a huge pain… so hopefully someone can chime in with an easy way to auto-import

Hope this helps someone!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)