Skip to content

Error when attempting to edit code #925

@ESMERALS

Description

@ESMERALS

I am met with an error whenever I attempt to edit code.

To Reproduce

  • Create a new app
  • Choose empty project
  • Choose Language Java
  • Choose minimum API version 31
  • Go to any file
  • Attempt to open your keyboard by tapping into the file

Expected behavior
The keyboard should open and allow you to edit the contents of the file.

Stack Trace

Build version: 0.2.9 ALPHA 
Build date: 1981-01-01 01:01:02 
Current date: 2026-02-15 07:00:44 
Device: Samsung SM-G990B2 
 
Stack trace:  
java.lang.ClassCastException: java.lang.String cannot be cast to android.text.Spanned
	at io.github.rosemoe.sora.widget.EditorInputConnection.getSurroundingText(EditorInputConnection.java:588)
	at android.view.inputmethod.RemoteInputConnectionImpl.lambda$getSurroundingText$11(RemoteInputConnectionImpl.java:612)
	at android.view.inputmethod.RemoteInputConnectionImpl.$r8$lambda$83kI_8DE8QPzNbnMIw4Y2rfJDVA(Unknown Source:0)
	at android.view.inputmethod.RemoteInputConnectionImpl$$ExternalSyntheticLambda7.get(D8$$SyntheticClass:0)
	at android.view.inputmethod.RemoteInputConnectionImpl.lambda$dispatchWithTracing$49(RemoteInputConnectionImpl.java:1526)
	at android.view.inputmethod.RemoteInputConnectionImpl.$r8$lambda$2C56kBNyimaX29P3MVRhxNO0E2M(Unknown Source:0)
	at android.view.inputmethod.RemoteInputConnectionImpl$$ExternalSyntheticLambda36.run(D8$$SyntheticClass:0)
	at android.os.Handler.handleCallback(Handler.java:995)
	at android.os.Handler.dispatchMessage(Handler.java:103)
	at android.os.Looper.loopOnce(Looper.java:273)
	at android.os.Looper.loop(Looper.java:363)
	at android.app.ActivityThread.main(ActivityThread.java:10060)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:632)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:975)

User actions: 
2026-02-15 06:56:45: MainActivity created
2026-02-15 06:56:45: MainActivity resumed

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions