Cannot resolve R.java, duplicate class
问题 I just start using Android Studio for a week and it works great for me, but when I started Android Studio today I get the error: 'error: duplicate class: mypackage.R'. I saw this error before when I used Eclipse so I tried to rebuild the project a few times and restarting Android Studio, this didn't help. After reading some Stackoverflow questions I tried to deleted R.java and rebuild again, now I don't get any error while rebuilding. The only problem is that Android Studio cannot resolve R,