Why do I receive a Java error when opening a GUIDE figure?
7 次查看(过去 30 天)
显示 更早的评论
MathWorks Support Team
2021-1-20
回答: MathWorks Support Team
2021-2-18
I am trying to create a new GUIDE figure. When I run "guide" in the command window and select "GUI with Uicontrols" from the templates, I receive the following error message in the command window:
java.lang.ClassCastException: [D cannot be cast to [Ljava.lang.String;
at com.mathworks.toolbox.matlab.guide.LayoutEditor.completed(LayoutEditor.java:2244)
at com.mathworks.toolbox.matlab.guide.LayoutEditor$ReadFigureCompleted.completed(LayoutEditor.java:3089)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.runOnMatlabThread(LayoutWorker.java:55)
at com.mathworks.jmi.MatlabWorker$2.run(MatlabWorker.java:79)
at com.mathworks.jmi.MatlabWorker.start(MatlabWorker.java:248)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.start(LayoutWorker.java:70)
at com.mathworks.toolbox.matlab.guide.utils.LayoutWorker.fevalConsoleOutput(LayoutWorker.java:41)
at com.mathworks.toolbox.matlab.guide.LayoutLooper.readFigure(LayoutLooper.java:713)
at com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:2026)
at com.mathworks.toolbox.matlab.guide.LayoutEditor.openLayoutEditor(LayoutEditor.java:1989)
Additionally, I receive the following pop-up error starting with "Error using flip Too many input arguments":

How do I fix this issue?
采纳的回答
MathWorks Support Team
2021-1-20
This error is occurring because the builtin MATLAB function "flip" is being shadowed by a user-defined function on the search path. To resolve the issue, first locate this user-defined function file by running "which flip" in the command window. Once the function file is located, rename the function / file to a different name that does not shadow a MATLAB builtin function. After this, the issue should be fixed.
0 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Environment and Settings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!