App Designer can't open .mlapp file
이전 댓글 표시
I have a massive propblem with a GUI in app Designer that I'm currently working on. I worked several week on this code and now I can't open the mlapp file anymore. The big problem is that I can't even open my code to debug - I have absolutely no idea what going on here. In the morning it worked fine but obviously I have an error somewhere in the code - but, as already mentioned, I can't take a look at the code.
I always get the following error:
Error using which
C:\Users\rene\Desktop\MATLAB\Kickbase Cup\KickGUI.mlapp: Can't open file.
Error in run (line 55)
pathscript = evalin('caller', strcat('which(''', script, ''')'));
I'm in desperate need of help.
Thanks
댓글 수: 3
Voss
2022년 3월 19일
Does restarting MATLAB and/or restarting the computer fix it?
Image Analyst
2022년 3월 19일
It's just a text file. Can you open it in a text editor or word processor? Does it look "normal" there? Maybe there are some weird characters somewhere in it that prevents it opening in app designer.
René Lampert
2022년 3월 20일
채택된 답변
추가 답변 (3개)
dijil hicham
2022년 11월 19일
0 개 추천
Hi ,
I had the same problem. Unfortunately, I could not find a way to run the application. One solution to at least recover your source code is to create a blank project, then in the editor, click on "compare" and select your corrupted project. A window will appear with the source code.
Chao Chao
2023년 8월 18일
0 개 추천
I had the same mistake just now. At first I want to try to change the suffix txt and expect to see the code. But the disappointment is that this mlapp is in binary file form.
Luckily all my code is backed up on onedrive. So I tried to restore the mlapp to the previous version a few days ago and temporarily cut the offending mlapp to the previous folder.
It is ridiculous that the restored version is still not usable! So I re-cut the problematic mlapp from the previous layer folder back to the original folder, and it actually worked again.
I can't figure out how. I have to say this is Schrodinger's mlapp
Stanislas
2025년 9월 12일
There is a way to rescue your project.
I guess the issue you are facing is that you tried to set the path of your interface at its beginning, using
path('C:\your_folder')
The problem is that you replaced Matlb's path with yours. When you open the app, it tries calling basic functions that it cannot find anymore.
The solution to open the app in order to modify this mistake, is to write a temporary empty path function:
function path()
end
Place this function, named path.m, in the same folder as your mlapp project. Now you should be able to open it. You can then use the function addpath to add your folders to the current path. You can also delete the path.m function you just created.
카테고리
도움말 센터 및 File Exchange에서 Startup and Shutdown에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
