Hi all! My app has minimum sdk as 21. I want to change it to 24 but app inventor is showing error as "An internal error has occurred. Report a bug?" on making change. Please help to resolve.
TIMAI2
October 23, 2026, 1:23pm
2
Where are you changing the min SDK ? In Project properties - Publishing ?
Does this error arise when using the companion app, compiled app, or in the main Appinventor app ?
Thanks for your prompt reply. I am changing this in properties panel under ‘publishing’.
TIMAI2
October 24, 2026, 12:54pm
4
Not seeing any issues arising from making a change to the min SDK in AppInventor.
Did you change/add anything else ?
1 Like
Hi @Zaiblab_Digital Thank you for reporting this issue. I have created an issue here.
opened 03:01PM - 24 Oct 26 UTC
bug
status: new
**Describe the bug**
From community: https://community.appinventor.mit.edu/t/an-… internal-error-on-changing-sdk/176896
In my findings, this issue occurs when a user tries to update `AndroidMinSdk` from the Designer property panel while on any screen other than `Screen1`. I was unable to reproduce the issue when `AndroidMinSdk` is updated through the `ProjectPropertiesDialogBox`. _(as claimed by user)_
_Problem_
In `MockForm.onPropertyChange()`, when the editor is not `Screen1` (i.e., the property is edited from the Designer property panel), the new value is never saved. This difference keeps the loop initiated by `DesignerEditor.onPropertyChange()` running, eventually causing a crash due to excessive recursion.
https://github.com/mit-cml/appinventor-sources/blob/3a4af6e4bbb30b24671716606009bc7fe8abbcea/appinventor/appengine/src/com/google/appinventor/client/editor/simple/components/MockForm.java#L1387-L1393
**Note:** When `AndroidMinSdk` is updated through the `ProjectPropertiesDialogBox`, the editor belongs to `Screen1`. This prevents the loop because the updated value is saved.
_Solution_
1. Properties such as `Sizing`, `TutorialURL`, etc. are also `DesignerProperty` in `Form.java`, but they are hidden in `MockForm` because they are application-level properties. Similarly, the `AndroidMinSdk` property should be hidden in `MockForm` since it is also an application-level property.
This single change will eliminate the bug, as `AndroidMinSdk` will only be updated through the `ProjectPropertiesDialogBox`.
<img width="448" height="153" alt="Image" src="https://github.com/user-attachments/assets/db528068-6c62-4aae-85a7-4b8b8067775a" /> <br>
_Other Problems_
1. We already have a choice property editor, `YoungAndroidMinSdkPropertyEditor.java`, but it is not wired up in `PropertiesUtil.java`. As a result, `AndroidMinSdk` is currently editable only through a text box. This can lead to build failures if the user enters an invalid value, such as `"string"` or `72`.
<img width="459" height="153" alt="Image" src="https://github.com/user-attachments/assets/adffb97d-1ee5-4c01-bae0-e9275e7eddf6" /> <br>
2. When we open the `ProjectPropertiesDialogBox` on one screen and then switch to another screen, the `AndroidMinSdk` property editor gets detached.
<img width="563" height="136" alt="Image" src="https://github.com/user-attachments/assets/702eee7b-8ce0-483f-88b7-f6b4e21386b3" /><br>
This happens because switching screens causes Designer to rebuild its properties panel. Since `AndroidMinSdk` is also eligible to be added to the properties panel because it is visible in `MockForm`, the property editor gets rebuilt and attached there as well. However, both surfaces use the same editor widget from Screen1’s property. Since a UI widget can have only one parent, adding it to the sidebar automatically detaches it from the dialog.
Reopening the cached dialog does not recreate the property editor widget, so it remains detached.
The solution mentioned above for recursion issue will fix this bug as well.
**Affects**
- [x] Designer
- [x] Buildserver
The issue occurs when we try to update the AndroidMinSdk from Designer property panel while on any screen other than Screen1. I also couldn't reproduce it when it is updated through properties panel.
1 Like
system
Closed
October 31, 2026, 3:03pm
6
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.