Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ActionbarSherlock not working

I am having problems getting start with the ActionBarSherlock. I downloaded the 4.1.0 version and followed the following tutorial for installing it.

http://www.youtube.com/watch?v=4GJ6yY1lNNY

The Problem I am facing is whenever I make a new project and add the library project of ActionbarSherlock to it. I get the following error.

Description Resource    Path    Location    Type
The container 'Android Dependencies' references non existing library 'C:\Work\JakeWharton-ActionBarSherlock-4.1.0-0-g9598f2b\JakeWharton-ActionBarSherlock-88fc341\library\bin\com_actionbarsherlock.jar'   myapp       Build path  Build Path Problem

Please anybody help me with it.

like image 925
Rookie Avatar asked Jun 30 '12 13:06

Rookie


4 Answers

I just had the same problem: A .jar file is requested, but non-existing. Also, it is okay that the file doesn't exist, because we want to use a Android-Library Project and not an included jar-library.

The steps described by Aqif Hamid are perfectly fine, if the missing import (.jar or library project) would be the root of the problem. But i figured out that the reason for this error is that you have to set both projects (AndroidBar Sherlock and your own Android project) to Java Compliance Level 1.6

To do so go into Project Properties => Java Compiler and set the level to 1.6 Of course, you have to install JDK 1.6 on your computer...

Hope this helps you too!

like image 160
muetzenflo Avatar answered Nov 16 '22 11:11

muetzenflo


The only thing that it works for me was selecting at Properties at Java Compiler Tab Compilance Level --> 1.7 (It was 1.6). After that Android Tools, Fix Project Properties

like image 33
Lola Priego Avatar answered Nov 16 '22 13:11

Lola Priego


DO the followings:

  • just like you have bin, res folders. right click on your project and add a folder named 'libs' (if libs folder is not already there).
  • Then copy paste your com_actionbarsherlock.jar file in this libs folder.
  • Right-click on your com_actionbarsherlock.jar file and click Add to Build Path.
  • Now clean and build your project. You should be good to go.

Edit:

To add project as a library do this:

  • Make sure you have your library project in your projects list and it is open.
  • Right click on your project in which you want to add your library project and select Porperties.
  • Click Android in properties windows, now scroll down, you will see library section at the bottom. There press Add button.
  • Now a window will open in which you will see list of library porjects. Select your required project and press Ok. Now that library project must be there with a green tick mark.
  • Press Apply and Ok button.
  • You should be good to go now.

regards, Aqif Hamid

like image 20
Aqif Hamid Avatar answered Nov 16 '22 11:11

Aqif Hamid


I am of the understanding that you cannot include ActionBarSherlock into your project by adding a jar to your lib directory (or just including the jar at all). You will have to create an android project for ActionBarSherlock then link to it as a library:

  1. Create ActionBarSherlock project in Eclipse
  2. Right-click your project and go to Properties
  3. Select Android in the left pane
  4. Then in the right pane, towards the bottom you can Add... the ActionBarSherlock project you created in step 1.

If you are curious why the jar approach doesn't work, I give you Jake's reply in this thread (although that's a month and a half old at this point).

like image 1
xbakesx Avatar answered Nov 16 '22 11:11

xbakesx