不能建立actionbarsherlock:BuildConfig不能被解析为一个变量 [英] Cannot build actionbarsherlock: BuildConfig cannot be resolved to a variable
问题描述
我采用进口的actionbarsherlock文件夹到工作区。然后,我保证以下几点:
I imported the actionbarsherlock folder into the workspace using "Import -> Existing Android Code Into Workspace". Then I ensured the following:
-
在清单:
In the manifest:
<使用-SDK安卓的minSdkVersion =7安卓targetSdkVersion =16/>
属性 - >安卓构建目标是API 16(安卓4.1.2)和IsLibrary检查
Properties -> Android: Build target is API 16 (Android 4.1.2) and IsLibrary is checked.
属性 - > Java编译器:编译器遵从性级别设置为1.6
Properties -> Java Compiler: Compiler compliance level is set to 1.6.
然而,我收到了很多的BuildConfig不能被解析为一个变量
错误。
And yet I'm getting a lot of BuildConfig cannot be resolved to a variable
errors.
我试图清理所有项目很多次,甚至重新启动Eclipse的好几倍。我甚至尝试手动添加BuildConfig类,但仍有大量的研究不能被解析为一个变量
错误,我解决不了。
I tried to clean all projects many times, and even restarted Eclipse several times. I even tried to add a BuildConfig class manually, but then there were still a lot of R cannot be resolved to a variable
errors that I could not resolve.
我读过几十个答案(像这样的:<一href="http://stackoverflow.com/questions/8787288/r-cannot-be-resolved-error-when-using-actionbarsherlock?rq=1">R使用ActionBarSherlock 时,无法得到解决的错误),但没有什么帮助。任何帮助将大大AP preciated。
I've read dozens of answers (such as this one: R cannot be resolved error when using ActionBarSherlock ), but nothing helps. Any help will be much appreciated.
推荐答案
奇怪的是,问题是,我跳过MIPS系统映像是我最后一次在Android SDK管理器更新的组件。现在我更新了MIPS的系统映像从版本2到4,一切都建立罚款。
Strangely enough, the problem was that I skipped MIPS System Image the last time I updated components in the Android SDK Manager. Now I updated MIPS System Image from revision 2 to 4, and everything builds fine.
我甚至不使用MIPS,但也许有一些奇怪的兼容性问题。
I don't even use MIPS, but maybe there was some strange compatibility issue.
这篇关于不能建立actionbarsherlock:BuildConfig不能被解析为一个变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!