I imported the actionbarsherlock folder into the workspace using "Import -> Existing Android Code Into Workspace". Then I ensured the following:
In the manifest:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="16"/>
Properties -> Android: Build target is API 16 (Android 4.1.2) and IsLibrary is checked.
Properties -> Java Compiler: Compiler compliance level is set to 1.6.
And yet I'm getting a lot of BuildConfig cannot be resolved to a variable
errors.
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.
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.
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.
I don't even use MIPS, but maybe there was some strange compatibility issue.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With