MATLAB Answers

When opening R2020b .mlapp file in R2018b, automatic conversion removes all UI elements and associated auto-generated code

8 views (last 30 days)
I am attempting to edit a .mlapp file that was created in the R2020b version of app designer. When I open the file in R2018b, app designer gives me the following notice:
In the updating process, all of the UI elements and their associated auto-generated code are removed. Only the user defined callbacks and properties are preserved. The result is a blank app with no functionality.
Here is a "before and after" comparison:
If you want to look at the code, the attached files are the .mlapp file before and after opening in R2018b.
Any suggestions on how I can preserve the UI elements and their code in the updating process?
This question seemed relevant to the problem I am having:
However, the suggested fix (rehash TOOLBOXCACHE) did not work for them or for me.

  2 Comments

Steven Lord
Steven Lord on 4 Nov 2020
Are you using much or any of the functionality introduced in App Designer after release R2018b in your app?
If you are, what do you expect App Designer to do when trying to convert your app to a release that predates the functionality you're using?
BENJAMIN PRITCHARD
BENJAMIN PRITCHARD on 4 Nov 2020
There are a couple elements in the app that have been updated according to the release notes, but those only involved behavior changes. So I guess no, there's no functionality in the app that was introduced after R2018b.
My hope would be that at least the functionality common to both versions would be preserved. Not have all of the elements removed.
This is my first time attempting to edit .mlapp files with an older MATLAB version. At this point, I don't know whether or not I should be expecting this to actually be possible.

Sign in to comment.

Accepted Answer

Benjamin Kraus
Benjamin Kraus on 11 Nov 2020
Edited: Benjamin Kraus on 13 Nov 2020
This is a known bug in App Designer apps that are saved in MATLAB R2020b and loaded in R2019b or older.
  • The bug will cause any container (such as a panel) that contains a UIAxes to be lost if the app is loaded in R2019b or older.
  • The app should continue to run in older releases.
  • The contents of the app should be fine if loaded in R2020a or R2020b.
You can follow this bug report to be notified when a fix is available.

  0 Comments

Sign in to comment.

More Answers (1)

Steven Lord
Steven Lord on 4 Nov 2020
I suspect it's going to be difficult to determine exactly why the components have been removed from the app without seeing the actual code of the app. If you cannot post the code to Answers, you may want to send the code to Technical Support directly (using the Contact Support link on the Support section of this website) and ask the Support staff to determine what about the app is causing the components to be removed. It's possible this is the expected behavior, that the conversion process was being too overzealous about removing what it thought wouldn't work in R2018b, or that the conversion process has a bug.

  1 Comment

BENJAMIN PRITCHARD
BENJAMIN PRITCHARD on 4 Nov 2020
Thanks Steve. I've attached the before and after files to the question. If I don't get a good answer in a day or two, I'll go ahead and send the code to Technical Support.

Sign in to comment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by