johannilsson / android-actionbar

DEPRECATED Android Action Bar Implementation
1.3k stars 564 forks source link

3 Errors after adding Library #11

Closed robisaks closed 13 years ago

robisaks commented 13 years ago

I successfully implemented this on one of my android applications, and it works great! I added the library to another project and got errors immediately after adding it. Errors are as follows:

The method getDrawable() of type ActionBar.AbstractAction must override a superclass method (Line 181 of ActionBar.java)

The method onClick(View) of type ActionBar must override a superclass method (Line 104)

The method performAction(View) of type ActionBar.IntentAction must override a superclass (Line 197)

I can resolve this by removing the @Override associated with each issue, but I am curious why it worked on one project and not another.

johannilsson commented 13 years ago

Most likely related to that the project is set up with java 1.5. Java 1.5 does not allow @Override on methods implemented from an interface, that was introduced in Java 1.6. Switching to Java 1.6 should resolve this problem.

In Eclipse you can do that from Application properties -> Java Compiler -> and select 1.6.

Hope this helps.

robisaks commented 13 years ago

Once again, you prove your awesomeness! Thank you!