简体   繁体   中英

Eclipse complains about getActionBar overridden method

android.app.Activity has getActionBar() method which returns android.app.ActionBar . Then a library project contains a custom activity which extends from Activity. This custom activity class has a getActionBar() method(without @OVERRIDE) which returns a custom ActionBar, not android.app.ActionBar . Then Eclipse complains about incompatible return type for the getActionBar(). Because this is an external library project I don't want to change the name getActionBar() and custom ActionBar class. Solution?

Is not possible. Change the name getActionBar(). Defining Methods in java

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM