Cleaning up ActionBarSherlock creates R error cannot be fixed

Recently (this morning) I updated a bunch of Android plugins in my eclipse environment (so I could switch to Android Studio), however I decided to return to Eclipse to finish something. I had to re-import the actionbarsherlock project (library 4.2.0). After I imported, make sure it works on Android 4.2 and as a library, I cleaned up the librarybarsherlock project "library". This has led to the fact that more than 200 "R cannot be solved with a variable" problem.

I tried all the usual suspects: I could not find errors in the res file, I tried to clean, update, close the eclipse in different different orders.

I also notice a new dependency called "Android Private Libraries" - I'm not sure if it's new to this update, but it could be.

Other information that may be useful: - no gen files (nothing is generated) - I also linked it to my Android project as a library (installed at the same API level) - I did some cleanups and immediately cleaned

Any help would be wonderful, I was stuck on this and it made me crazy.

+4
source share
7 answers

Solved by updating the API, as well as the tools and everything else, which I updated this morning. A very strange situation.

+1
source

You should check the private android libraries in the build path of the java project:

enter image description here

+2
source

In my case, I had the wrong Android target. To solve this problem: Right-click on your project, then select "Properties", then click "Android" and select the correct project build target. I had Android 2.3.3, and I changed it to Android 4.2.2.

Hope this helps someone. enter image description here

+1
source

This problem was stupid (I mean this situation) ... and I used a stupid way to solve it.

  • update the API and SDK for Android and all that you can.
  • Open the library project properties window, go to [Java Build Path], [Order and Export]
  • Use the [Up] [Down] button to make the sort sequence as follows:

enter image description here

After that, it still shows the same error, so you need to rebuild this project with one library again.

  • Check top menu, [Project], [Clear ...]
  • Clean this single library project, make it automatically restored.

The way I solve my entire library throws the same problem. (ActionBarSherlock, FacebookSDK, SlidingMenu, ViewPagerIndicator)

Sounds like a dumb decision, but just fits that dumb situation.

Google, what the hell are you doing?

0
source

In my case, I am running 64-bit Linux (Linux Mint) and I had to install 32-bit libraries using sudo apt-get install ia32-libs

After installing the 32-bit libraries, I restarted eclipse and emptied the ActionBarSherlock library, and all this is good

0
source

Do you use the Android support library?

I had this error because I had a different version of the Android support library banner in ABS compared to the rest of my project. Make sure that the bans of the support library that you use are identical in each project.

0
source

Oddly enough, this problem is fixed when I add the old tastes of the Android SDK build tools : 18.x and 17.x

(For some reason, I deleted some of them)

enter image description here

0
source

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


All Articles