Android-support-v4.jar isn't importing correctly in Eclipse?

Looks like it is looking for jar here :/Applications/eclipse/Eclipse. App/Contents/MacOS/v4/android-support-v4.jar.

Up vote 3 down vote favorite share g+ share fb share tw.

I'm trying to get an app to compile that uses the android-support-v4. Jar and the Fragmentation classes it contains, but I keep getting messages whenever I try to compile that there are errors in the code. All of the errors have to do with different Fragmentation classes that are in the .JAR.

I have tried ctrl-clicking the project folder and then selecting Android Tools -> Add Compatibility Library and I keep getting this error: 2011-12-20 11:55:31 - Android Compatibility JAR not found: /Applications/eclipse/Eclipse. App/Contents/MacOS/v4/android-support-v4. Jar Why would it be looking for the .

JAR in Eclipse's Package Contents? I've gone into the project properties and went to the Java Build Path, and imported the . JAR from the MainActivity/libs folder, that didn't work, and then I tried to import it from my SDK directory, and that didn't work.

I've fixed the project properties and cleaned and built it countless times, I've restarted Eclipse, my computer, re-downloaded and installed Eclipse, the Android SDK's and ADT and still nothing. I am completely stumped. Edit I've gone through the build path and imported the .

JAR from both the MainActivity/libs and my SDK directory. For the hell of it I added the . JAR in the directory that keeps appearing in the errors and that hasn't worked.

What's making Eclipse look for it in it's Application Package Contents? Update So after tinkering the project contents aren't showing any errors but the MainActivity folder still says that there is one and I still can't compile. Like nyah: Revision So I think the question may be "Why is Eclipse looking for the .

JAR in the Eclipse Application's package contents instead of the libs directory of the project or the Android SDK directory that I used to import it as an external . JAR? " Update #2 I am only getting one error now after tinkering, it's on this method: @Override public MenuItem setOnActionExpandListener(OnActionExpandListener onActionExpandListener) { // Noop return this; } The Quick Fix says that I should delete the @Override annotation but that method must override a super class method.

These are the errors that it shows: Multiple markers at this line - The method setOnActionExpandListener(MenuItem. OnActionExpandListener) of type SimpleMenuItem must override a superclass method - implements android.view.MenuItem. SetOnActionExpandListener java android jar compatibility android-compat-lib link|improve this question edited Dec 22 '11 at 0:00 asked Dec 20 '11 at 18:07JustLikeThat5819 62% accept rate.

Looks like it is looking for jar here :/Applications/eclipse/Eclipse. App/Contents/MacOS/v4/android-support-v4. Jar android-support-v4.

Jar is found in /extras/android/compatibility/v4 Please make sure you add this as an external jar in the java build path.

Yeah I did, I thought I had mentioned that, I'll add it in. Like I said I've added the . JAR from the MainActivity/libs and as an external .

JAR from my SDK directory and that hasn't done anything that I can see. – JustLikeThat Dec 20 '11 at 18:24.

If this is still not solved: Like already said, in Eclipse go to your Project Properties > Java Build Path > Libs > Add External and get the one from the adk directory. Also set up Java 1.6 as your default compile version if you already haven't. This should solve the Override Errors you described.

Welcome to stackoverflow and thanks for the answer provided! – owlstead Jan 1 at 23:51 Thanks for the attempt, the problem is still not solved. I've already made sure the build path points to the external JAR in my SDK directory and that Eclipse uses 1.6 to compile.

– JustLikeThat Jan 3 at 19:44 Hmm, have you tried the hard way by setting up a fresh Eclipse installation? Saves you more time and nerves than arguing with this error for so long. – Juke Jan 4 at 21:28.

I realize that this question has been answered, but this is a known issue that is supposed to be fixed in the ADT-17 plugin release according to comment 9 here: code.google.com/p/android/issues/detail?... In addition, people who have this problem can copy the compatibility JAR to the location it says it can't find it. Clearly it's looking in the wrong place (since it's checking the Eclipse directory rather than the android-sdk directory), so the simple fix, for now, is simply to put the package where it wants to find it, even though it doesn't belong. For me it was as simple as copying the v4 directory within C:/android-sdk/extras/android/support/ into the C:/eclipse/ directory.

Do you try not to do Android Tools -> Add Compatibility Library, and only add the jar in java build path library?. I use this jar library of this way and it works without any problem.

I did, and my coworker has this working fine on his machine, I'm really stumped about this – JustLikeThat Dec 21 '11 at 18:09 For me, it's when I use Android Tools > Add Compatibility Library that it looks in the Eclipse folder. I'm not sure why, seems silly. – Brian Lacy Jan 23 at 20:01.

It turns out that my Debug Certificate had expired so I just needed to delete ~/. Android/debug. Keystore and restart Eclipse and everything worked.

Another caveat was running Android SDK Manager in Windows 7 without administrator privileges. It would try to install support package, but would always fail, and the actual package never got downloaded to "C:\Program Files (x86)\Android\android-sdk\extras\android\support\v4\android-support-v4. Jar".

I had the same problem. Under the project properties:Java Build Path:Order and Export tab, the box next to android-support-v4. Jar wasn't checked.

I checked the box, and the error went away.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions