我清理了我的android项目,现在我收到这个错误,说我需要放在import android.R;
顶部,当我这样做时,它会说任何字段都不可见,例如我有这行编码
setContentView(R.layout.inbox);
当我将鼠标悬停在错误标记上时,我得到
Multiple markers at this line
- Inbox cannot be resolved or is not a field
- R cannot be resolved to a variable.
我在我所有的活动中都得到了这个
更新:
我的 XML 中的一些错误导致 R.java 在清理过程中无法重建
Description Resource Path Location Type
error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/friendrowbg'). friendslistselector.xml /atmebeta/res/layout line 8 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'background' with value '@drawable/friendslistselector'). friend_row.xml /atmebeta/res/layout line 1 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/friendrowbg'). friendslistselector.xml /atmebeta/res/layout line 2 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'drawable' with value '@drawable/friendrowbg'). friendslistselector.xml /atmebeta/res/layout line 6 Android AAPT Problem
error: Error: No resource found that matches the given name (at 'listSelector' with value '@drawable/friendslistselector'). friends.xml /atmebeta/res/layout line 29 Android AAPT Problem