0

I think I have successfully created a library project ActionBarShirlock (4.3.1). Then when I attempt to add it to my app by clicking properties > android then clicking on the "Add" button, I see a box saying "Please select a library project" and I select "actionbarshirlock". actionbarshirlock then appears in my list of libraries accompanied by a large green tick to the left of it. I click "ok". But then If I immediately go back to the properties dialog, I see a large red cross where the green tick used to be.

What happened?

EDIT: I noticed that in the latest release (4.3.1) of ActionBarShirlock, the directory structure within the zip file you download from actionbarsherlock.com is different from how it used to be in earlier versions, and so some tutorials of how to install it are no longer valid. So I had better explain how I created the library in the first place...

Step 1. I downloaded the zip file and expanded it into c:\android stuff\JakeWharton-ActionBarSherlock-071a61c

Step 2. From eclipse I clicked file > new > other > android > android project from existing code. Then next.

Step 3. From the "Iport projects" dialog, I clicked browse, then navigated to "C:\android stuff\JakeWharton-ActionBarSherlock-071a61c\actionbarsherlock" and clicked "ok".

Step 4. I now see "actionbarshirlock" in the "new project name" list, the tick box to the left is already ticked. ("copy projects into workspace" is not selected). I click "Finish"

Step 5. In package explorer I now see actionbarshirlock in my list of projects. I then to clean all projects and build all. There are no errors or warnings in my "Problems" tab.

Thats' it.

Mick
  • 8,284
  • 22
  • 81
  • 173
  • http://stackoverflow.com/questions/16636039/java-lang-classnotfoundexception-after-changing-nothing-in-the-project-but-upgra/16636127#16636127. try this if you are using adt rev 22 tools.The red x usually due to broken link or path – Raghunandan May 22 '13 at 12:00
  • @Raghunandan:The answer to the SO question you linked to suggested "Make sure that Android Private Libraries is selected." - but no such library is listed in my "order/export" tab. – Mick May 22 '13 at 12:04
  • i also said try that if you have updated adt to rev 22. Check the above comment – Raghunandan May 22 '13 at 12:05
  • Check [this link](http://stackoverflow.com/a/16398402/2345913) Here you will also get link to implement the same. – CRUSADER May 22 '13 at 12:11

2 Answers2

0

Try to follow the beginning of this two guides: link1 link2 The only thing different for the current version is that you have to import the main folder, where pom.xml is. After that if you get an error remember to delete android-support-v4 from your linked library

Pievis
  • 1,954
  • 1
  • 22
  • 42
  • The directory structure within the latest (4.3.1) actionbarshirlock zip file has changed since that tutorial was written. – Mick May 22 '13 at 12:26
  • I know, but I did it almost 3 days ago and it worked, just read what I've said after the links, when you import select the folder in which pom.xml is (That would be the main folder where the other directories are). – Pievis May 22 '13 at 12:31
0

Shutting down eclipse and running it again made the problem disappear!

Mick
  • 8,284
  • 22
  • 81
  • 173