Skip to content
This repository was archived by the owner on Oct 18, 2024. It is now read-only.
This repository was archived by the owner on Oct 18, 2024. It is now read-only.

[Bug]: IOOB when removing item selected in 'Additional Gradle Commands' setting #1444

Description

@Rafael2616

What happened?

When removing the a fifth item in the in the Gradle command dialog the app crashes

Video from user in the group. Error was also reproduced on my side

VID_20231109_221343_279.mp4

What's the expected behavior?

Not crash

What version of AndroidIDE you're using?

v2.6.0 (debug builds)

Relevant log output

Stacktrace:
java.lang.IndexOutOfBoundsException: Index: 5, Size: 3
	at java.util.ArrayList.remove(ArrayList.java:503)
	at com.itsaky.androidide.preferences.ChoiceBasedDialogPreference.onSelectionChanged(Unknown Source:20)
	at com.itsaky.androidide.preferences.MultiChoicePreference$$ExternalSyntheticLambda0.onClick(Unknown Source:7)
	at androidx.appcompat.app.AlertController$AlertParams$4.onItemClick(Unknown Source:24)
	at android.widget.AdapterView.performItemClick(AdapterView.java:318)
	at android.widget.AbsListView.performItemClick(AbsListView.java:1235)
	at android.widget.AbsListView$PerformClick.run(AbsListView.java:3219)
	at android.widget.AbsListView$3.run(AbsListView.java:4312)
	at android.os.Handler.handleCallback(Handler.java:873)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:205)
	at android.app.ActivityThread.main(ActivityThread.java:6993)
	at java.lang.reflect.Method.invoke(Native Method)
	at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:884)

Duplicate issues

  • This issue has not been reported yet.

Code of Conduct

  • I agree to follow this project's Code of Conduct

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions