0

I have a service class that extends InputMethodService. When i want to bind this service to my ActivityMain, at code below i get the "Cannot override the final method from AbstractInputMethodService" error.

public class MyIME extends InputMethodService
    implements KeyboardView.OnKeyboardActionListener, OnSharedPreferenceChangeListener {

 //some code here...
@Override
public IBinder onBind( Intent intent ) {

    return binder;
}

What is this error and how to fix it?

Mori
  • 1
  • 2
  • as stated by the message, you can not override a `final` method.. –  Feb 21 '16 at 14:19
  • 1
    Possible duplicate of [Java final modifier](http://stackoverflow.com/questions/4012167/java-final-modifier) –  Feb 21 '16 at 14:20

1 Answers1

0

What is this error

onBind() is declared as final in AbstractInputMethodService. You cannot override it.

and how to fix it?

Delete your onBind() method.

CommonsWare
  • 986,068
  • 189
  • 2,389
  • 2,491