Android - activity_main cannot be resolved or is not a field

后端 未结 11 1810
栀梦
栀梦 2020-12-05 05:40

Previous people have had the same error message, but the solution has always been to remove or modify some import \"android.R\". I have no such import so I\'m really lost

11条回答
  •  生来不讨喜
    2020-12-05 06:32

    I have three ways that help me to solve this problem, may be it works for you.

    1. first clean than try to import your project like this: import com.example.mapssample.R;
    2. right click on project go to properties--> android --> select target.
    3. clean

提交回复
热议问题