Cannot Importing project to Eclipse

1,494 views
Skip to first unread message

Nick

unread,
Mar 14, 2012, 10:14:27 PM3/14/12
to ActionBarSherlock
So I just downloaded the .zip from the website. I was expecting to get
a .jar file that I could just add to my project and start using, but I
got the source instead. No big deal, I can just build it myself, I
thought. Well, not really... I cannot even import the project into
Eclipse. File > Import > Existing Projects into Workspace > select the
root folder, and no projects are found to import. I tried importing
the library folder, and the root "JakeWharton-ActionBarSherlock-
df676ad" folder. No projects found in either.

My Java compiler is set to 1.6

Any ideas what's going on?
Message has been deleted
Message has been deleted

Jake Wharton

unread,
Mar 15, 2012, 12:54:04 PM3/15/12
to actionba...@googlegroups.com
It's a library project and cannot be compiled as a .jar. There are no IDE-specific project files, you can easily import the project sources, however.


---
Jake Wharton
http://about.me/jakewharton


On Wed, Mar 14, 2012 at 7:16 PM, Nick <npu...@gmail.com> wrote:
Hrmm... I was editing the title of this and meant to hit backspace to
delete the "ing" in "Importing" but accidentally hit Enter twice
instead of Backspace. Looks like same thing got posted twice and I
don't see an edit button... Didn't do that on purpose.

Nick

unread,
Mar 15, 2012, 8:11:15 PM3/15/12
to ActionBarSherlock
Ok, I followed along with every step exactly up until 7:36 when the
activity is changed to extend SherlockActivity instead of Activity and
"Import com.actionbarsherlock.app.SherlockActivity" is added. I did
everything the tutorial says to do and I've tried it multiple times
and every time when I get to this part it always says
"com.actionbarsherlock.app cannot be resolved." I tried searching for
this error on google and stackoverflow and couldn't find anything
relevant.

On Mar 15, 11:54 am, Jake Wharton <jakewhar...@gmail.com> wrote:
> It's a library project and cannot be compiled as a .jar. There are no
> IDE-specific project files, you can easily import the project sources,
> however.
>
> http://www.youtube.com/watch?v=4GJ6yY1lNNY
>
> ---
> Jake Whartonhttp://about.me/jakewharton

Graham Smith

unread,
Mar 15, 2012, 8:36:28 PM3/15/12
to actionba...@googlegroups.com
Nick

It is very late here (1 am) so I can't respond till I have slept. I would say someone in your time zone should help.

Initial thoughts, did you add the abs project to your own via properties -> android -> add project? If yes does the abs project compile, check with a clean and build.

Sent from my HTC

Nick

unread,
Mar 15, 2012, 8:43:00 PM3/15/12
to actionba...@googlegroups.com
Yes, I added the abs project as a library through Properties > Android. And Yes, the abs project does compile. 

Nicholas Layton

unread,
Mar 17, 2012, 12:46:57 AM3/17/12
to actionba...@googlegroups.com
Ahhh... So I went to look at the source code for SherlockActivity and I realized when I created a new project from existing source it never copied the src and res files into my project. I should have checked because it did the same thing with AndroidManifest.xml and I copied that file manually. So I copied the src and res files into my abs project and it looks like it's working now.

MJ

unread,
Apr 28, 2012, 1:44:57 AM4/28/12
to actionba...@googlegroups.com
So, I was having the same issue, and for anyone else who may be experiencing it, here's the problem and solution:

I had extracted the "JakeWharton-ActionBarSherlock-*" directory to my eclipse workspace directory.  Then, when creating the project from the library directory, it actually created a new directory in the workspace, and failed to even copy any of the necessary files.

The solution was simply to move the extracted folder somewhere else.  I personally put it in the Android SDK directory, then created the project from the library directory in there.

Reply all
Reply to author
Forward
0 new messages