Note that there are some explanatory texts on larger screens.

plurals
  1. POandroid-support-v4.jar isn't importing correctly in Eclipse
    primarykey
    data
    text
    <p>I'm trying to get an app to compile that uses the <code>android-support-v4.jar</code> and the <code>Fragmentation</code> 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 <code>Fragmentation</code> classes that are in the <code>.JAR</code>. I have tried <code>ctrl-clicking</code> the project folder and then selecting <code>Android Tools -&gt; Add Compatibility Library</code> and I keep getting this error:</p> <pre><code>[2011-12-20 11:55:31 - Android Compatibility JAR not found:] /Applications/eclipse/Eclipse.app/Contents/MacOS/v4/android-support-v4.jar </code></pre> <p>Why would it be looking for the <code>.JAR</code> in Eclipse's Package Contents? I've gone into the project properties and went to the Java Build Path, and imported the <code>.JAR</code> from the <code>MainActivity/libs</code> 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.</p> <hr> <h2>Edit</h2> <hr> <p>I've gone through the build path and imported the .JAR from both the <code>MainActivity/libs</code> 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?</p> <hr> <h2>Update</h2> <hr> <p>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.</p> <p>Like nyah:</p> <p><img src="https://i.stack.imgur.com/PgGTz.png" alt="enter image description here"></p> <hr> <h2>Revision</h2> <hr> <p>So I think the question may be "Why is Eclipse looking for the .JAR in the Eclipse Application's package contents instead of the <code>libs</code> directory of the project or the Android SDK directory that I used to import it as an external .JAR?"</p> <hr> <h2>Update #2</h2> <hr> <p>I am only getting one error now after tinkering, it's on this method:</p> <pre><code>@Override public MenuItem setOnActionExpandListener(OnActionExpandListener onActionExpandListener) { // Noop return this; } </code></pre> <p>The Quick Fix says that I should delete the @Override annotation but that method must override a super class method.</p> <p>These are the errors that it shows:</p> <pre><code>Multiple markers at this line - The method setOnActionExpandListener(MenuItem.OnActionExpandListener) of type SimpleMenuItem must override a superclass method - implements android.view.MenuItem.setOnActionExpandListener </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload