Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncaughtException java.lang.AbstractMethodError when install the signed APK of sample app #48

Closed
RandunuK opened this issue Apr 8, 2021 · 4 comments
Labels
bug Something isn't working

Comments

@RandunuK
Copy link
Contributor

RandunuK commented Apr 8, 2021

I'm getting the following exception when install the signed APK of the sample app.

    java.lang.AbstractMethodError: abstract method "io.github.rosemoe.editor.widget.SymbolPairMatch io.github.rosemoe.editor.interfaces.EditorLanguage.getSymbolPairs()"
        at io.github.rosemoe.editor.widget.CodeEditor.setEditorLanguage(CodeEditor.java:635)
        at io.github.rosemoe.editor.app.MainActivity.onCreate(MainActivity.java:95)
        at android.app.Activity.performCreate(Activity.java:6942)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1126)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2880)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2988)
        at android.app.ActivityThread.-wrap14(ActivityThread.java)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1631)
        at android.os.Handler.dispatchMessage(Handler.java:102)
        at android.os.Looper.loop(Looper.java:154)
        at android.app.ActivityThread.main(ActivityThread.java:6682)
        at java.lang.reflect.Method.invoke(Native Method)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1520)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1410)
@itsaky
Copy link
Contributor

itsaky commented Apr 8, 2021

I think this happens due to unimplemented getSymbolPairs method in JavaLanguage.

The JavaLanguage class should implement getSymbolPairs interface method and at least return null. Doing so, the error is fixed.

@RandunuK
Copy link
Contributor Author

RandunuK commented Apr 8, 2021

I think this happens due to unimplemented getSymbolPairs method in JavaLanguage.

The JavaLanguage class should implement getSymbolPairs interface method and at least return null. Doing so, the error is fixed.

yep, this will fix the issue.

@Override
    public SymbolPairMatch getSymbolPairs() {
        return new SymbolPairMatch.DefaultSymbolPairs();
    }

@RandunuK RandunuK changed the title uncaughtException when install the signed APK of sample app uncaughtException java.lang.AbstractMethodError when install the signed APK of sample app Apr 8, 2021
Rosemoe added a commit that referenced this issue Apr 8, 2021
If the whole text is selected, clicking on a whitespace in the selected region exits selection mode & #46 #48 #44
@itsaky
Copy link
Contributor

itsaky commented Apr 8, 2021

I think this can be closed now...

@Rosemoe
Copy link
Owner

Rosemoe commented Apr 8, 2021

I reproduced this before the update on Android Lollipop. The problem seems to be caused by low Android version and will exists in other languages modules that didn't implement their own getSymbolPairs() method.
Default methods are supported since Android N. I'll remove default modifiers and implement them in subclasses.

@Rosemoe Rosemoe added the bug Something isn't working label Apr 8, 2021
@Rosemoe Rosemoe closed this as completed in ebb5984 Apr 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants