One day, I was happily packing and testing. I could pack in the last second, and then in the next second. . . . An error was reported when packing. . . . . . . Note: My Java environment is fully available
JAVA_HOME is not set and no 'java' command could be found in your PATH
Baidu is the best solution:
To summarize: Uncheck the box in the figure below, and then check it again. Maybe it can be solved (I solved it this way, speechless...)