Android Studio cannot resolve R in imported project?

后端 未结 30 2211
名媛妹妹
名媛妹妹 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 03:01

    In my case I had an Activity file imported from Eclipse that had the line:

    import android.R;
    

    So all of my R classes were resolving to the SDK, as soon as I commented out that line everything compiled correctly to my package. I only noticed the issue when I was moving the project from my Mac to my Windows machine.

提交回复
热议问题