Android Studio cannot resolve R in imported project?

后端 未结 30 2201
名媛妹妹
名媛妹妹 2020-11-30 02:27

I\'m trying the new Android Studio. I\'ve exported a project from eclipse, using the build gradle option. I\'ve then imported it in Android Studio. The R.java file under gen

30条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-30 02:39

    In my case:

    I had to Copy Reference the R file; i.e. right click gen//R and Copy Reference. Then paste that over the R in your code where it fails to resolve.

    That solved it for me (after trying everything else here). Still not sure why it worked to be honest.

提交回复
热议问题