Using ActionBarSherlock library gets error "R-class cannot be resolved"

I am using ActionBarSherlock to create an action bar for the Android 2.1 platform.

But in Eclipse, regardless of whether I import an existing project from the ActionBarSherlock download library or create a new project from the download library, I always get a " R cannot be resolved " error. Then I notice that there is no R.java file in the gen/ R.java . I tried to clean up the project, but that does not help ... Can anyone help me on how to get rid of this ActionBarSherlock library ?

+4
source share
1 answer

ActionBarSherlock (v3.x) requires that you compile with Android 3.2. The reason you don't see the R.java file is because you are probably using the previous version to compile, which means that some styles that are used on Android 3.0+ cannot be found.

Make sure you create Android 3.2, the target API 11+ in your manifest, and use JDK 1.6. These are common errors with compiling a library.

+4
source

Source: https://habr.com/ru/post/1395022/


All Articles