Android Studio cannot resolve R in imported project?

后端 未结 30 2206
名媛妹妹
名媛妹妹 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:47

    At first check if there is import android.R; in top of your class this happens when auto import in enable in android studio.

    after that comment all lines of your code that you use R variable (you can comment entire class or ...) then run application it regenerates R variable and you can uncomment your code.

提交回复
热议问题