Error message when placing any component in app designer.

If I create a blank app and I try to place down any component from the component library (a label in this case), an error message window pops up, with the following text:
Unable to add component matlab.ui.control.Label. Component creation failed with error: Too many input arguments.
I did not write a single line of code anywhere, and did not modify any code or settings. I just started app designer by typint "appdesigner" in MATLAB command line and dropped a Label from the left side to the layout. I can add context menu, menu bar and toolbar without any issue. Why is this happening?

6 件のコメント

Nikhil
Nikhil 2023 年 7 月 6 日
Can you share your model to reproduce the issue?
Sólyomvári
Sólyomvári 2023 年 7 月 6 日
Here. (It is basically a blank app)
Nikhil
Nikhil 2023 年 7 月 6 日
Refer to the issue mention in this question and try the workaround : App Designer Error
Sandeep Mishra
Sandeep Mishra 2023 年 7 月 6 日
Hello Sólyomvári
One possible reason for this error can be MATLAB doesn't have default path
Can you run the below two commands in MATLAB window and check if it works
>>restoredefaultpath
>>rehash toolboxcache
Sólyomvári
Sólyomvári 2023 年 7 月 6 日
Hello. I ran the two commands and it fixed the issue. Thanks a lot!
Sandeep Mishra
Sandeep Mishra 2023 年 7 月 6 日
Thanks for confirmation,
I am answering the same to mark the question answered!

サインインしてコメントする。

 採用された回答

Sandeep Mishra
Sandeep Mishra 2023 年 7 月 6 日

1 投票

Hello Sólyomvári,
I understood from our discussion in the comments that the possible reason for the error is MATLAB doesn't have default path.
You can se the default path for MATLAB by running below two command in MATLAB command window
>> restoredefaultpath
>> rehash toolboxcache
You can refer to the below documentation to learn more about "rehash toolboxcache" and "restoredefaultpath" in MATLAB.

1 件のコメント

feng
feng 2024 年 7 月 22 日
Thankyou so much! it‘s an easy and great way!it works!

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDevelop Apps Using App Designer についてさらに検索

製品

リリース

R2022b

質問済み:

2023 年 7 月 6 日

コメント済み:

2024 年 7 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by