2012-06-23 5 views
19

Ok importiert, ich versuche ActionBarSherlock zum Laufen zu bringen, so importierte ich die Bibliothek von:ActionBarSherlock Bibliothek ist voller Fehler nach

Creating New Project > Create Project From Existing Source > Choosing library from the ActionBarSherlock folder 

Danach habe ich ein Beispielprojekt aus den Proben importierte den Ordner mit gleiche Methode, Sowohl die Bibliothek als auch das Beispiel sind auf Android 15 Build Path gesetzt!

Mein Problem ist, über 100 Fehler kommen in der Bibliothek, alle Arten von Sachen über Call erfordert API Level 11, und ich habe keine Ahnung, was falsch ist!

Dinge, die ich habe versucht:
Reinigung Projekt
Rahmen Build-Pfad bis 13, 14 und 15

Die meisten Fehler sagen:

Call requires API level 11 (current min is 8): android.app.something 

Update: Ich habe versucht, auf dem lib rechts klicken Datei und klicken Sie auf Hinzufügen, um Pfad zu erstellen, das hat nicht funktioniert, das sind ein paar der Fehler, die ich bekomme:

Description Resource Path Location Type 
The method add(CharSequence) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 33 Java Problem 
The method add(int, int, int, CharSequence) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 43 Java Problem 
The method add(int, int, int, int) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 48 Java Problem 
The method add(int) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 38 Java Problem 
The method addIntentOptions(int, int, int, ComponentName, Intent[], Intent, int, MenuItem[]) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 81 Java Problem 
The method addOnAttachStateChangeListener(View_OnAttachStateChangeListener) of type ActionMenuItemView must override a superclass method ActionMenuItemView.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 84 Java Problem 
The method addOnAttachStateChangeListener(View_OnAttachStateChangeListener) of type ActionMenuPresenter.OverflowMenuButton must override a superclass method ActionMenuPresenter.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 627 Java Problem 
The method addSubMenu(CharSequence) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 61 Java Problem 
The method addSubMenu(int, int, int, CharSequence) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 71 Java Problem 
The method addSubMenu(int, int, int, int) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 76 Java Problem 
The method addSubMenu(int) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 66 Java Problem 
The method clear() of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 101 Java Problem 
The method clearHeader() of type SubMenuWrapper must override a superclass method SubMenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 49 Java Problem 
The method close() of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 157 Java Problem 
The method collapseActionView() of type ActionMenuItem must override a superclass method ActionMenuItem.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 264 Java Problem 
The method collapseActionView() of type MenuItemImpl must override a superclass method MenuItemImpl.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 612 Java Problem 
The method collapseActionView() of type MenuItemWrapper must override a superclass method MenuItemWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 254 Java Problem 
The method collapseItemActionView(MenuBuilder, MenuItemImpl) of type ActionBarView.ExpandedActionViewMenuPresenter must override a superclass method ActionBarView.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/widget line 1497 Java Problem 
The method describeContents() of type ActionMenuPresenter.SavedState must override a superclass method ActionMenuPresenter.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 557 Java Problem 
The method expandActionView() of type ActionMenuItem must override a superclass method ActionMenuItem.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 259 Java Problem 
The method expandActionView() of type MenuItemImpl must override a superclass method MenuItemImpl.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 598 Java Problem 
The method expandActionView() of type MenuItemWrapper must override a superclass method MenuItemWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 249 Java Problem 
The method expandItemActionView(MenuBuilder, MenuItemImpl) of type ActionBarView.ExpandedActionViewMenuPresenter must override a superclass method ActionBarView.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/widget line 1471 Java Problem 
The method findItem(int) of type MenuWrapper must override a superclass method MenuWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 127 Java Problem 
The method flagActionItems() of type ActionBarView.ExpandedActionViewMenuPresenter must override a superclass method ActionBarView.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/widget line 1466 Java Problem 
The method flagActionItems() of type MenuPopupHelper must override a superclass method MenuPopupHelper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 280 Java Problem 
The method getActionProvider() of type ActionMenuItem must override a superclass method ActionMenuItem.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 243 Java Problem 
The method getActionProvider() of type MenuItemWrapper must override a superclass method MenuItemWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 240 Java Problem 
The method getActionView() of type MenuItemWrapper must override a superclass method MenuItemWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 229 Java Problem 
The method getAlphabeticShortcut() of type MenuItemWrapper must override a superclass method MenuItemWrapper.java /com_actionbarsherlock/src/com/actionbarsherlock/internal/view/menu line 123 Java Problem 
+0

Können Sie benennen Sie mindestens einige spezifische Fehler? – EboMike

+0

@EboMike Ich habe meine Frage bearbeitet. –

+0

@AlexLockwood Entschuldigung, es hatte etwa 150 von ihnen und sie alle sagten etwas anderes. Ich habe mehr Fehler hinzugefügt –

Antwort

54
  • Zum bauen Eigenschaften> Java-Compiler zum Projekt. Verwenden Sie JDK 1.6.
  • Stellen Sie sicher, dass Sie sowohl die Bibliothek als auch Ihre App mit Android 4.0 und höher kompilieren
  • Stellen Sie sicher, dass Ihre targetSdkVersion 14 oder höher ist.
+2

Danke sooo viel, das hat funktioniert! : D Ich hatte es auf JDK 1.5 eingestellt. p.s. ActionBarSherlock ist total genial! –

+1

danke Mann, das hat auch für mich funktioniert! – slinden77

+0

@Jake Wharton ist der Schöpfer dieser genialen Bibliothek ... Wir sollten alle ihm dankbar sein ... – aProgrammer

6
  1. Suchen Sie im Projekt-Explorer die Datei android-support-v4.jar im Verzeichnis libs. Rechtsklick auf diese Datei und fügen Sie sie Build-Pfad mit:

    Build-Pfad ->hinzufügen Weg

0

der rechten Maustaste, wählen Sie Eigenschaften, Java Build-Pfad, Bibliotheken Registerkarte klicken Bibliotheken hinzufügen ... und hinzufügen JRE System Library 1.6

0

Rechtsklick, wählen Sie Eigenschaften, Java Build Path, Registerkarte Bibliotheken; Klicken Sie auf "Bibliotheken hinzufügen" und fügen Sie "JRE System Library 1.6" hinzu.

Bestätigen Sie die Änderung, und entfernen Sie die später hinzugefügte JRE-Systembibliothek.

0

Stellen Sie sicher, dass die neue Bibliothek Manifest-Paket ist „com.actionbarsherlock“

(Vielleicht ist es nur mich, aber ich schuf das Projekt auf der Oberseite, wo hatte ich bereits den Bibliotheksordner extrahiert.)

Verwandte Themen