cocos creator 2.4.3 hello_world空项目 真机调试黑屏

  • Creator 版本: 2.4.3

  • 目标平台: iOS

  • 重现方式:
    使用helloWorld ts demo工程构建项目,使用xcode打开工程并链接手机调试,启动后. cocos启动页正常显示,然后黑屏,报错日志如下

  • 报错:
    Starting inspector on 0.0.0.0:6086 failed: address already in use
    [FATAL ERROR]: Port [:6086] is occupied by other processes, try to kill the previous debug process or change the port number in jsb_enable_debugger.

Assertion failed: (false), function Start, file /Applications/CocosCreator/Creator/2.4.3/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/scripting/js-bindings/jswrapper/v8/debugger/inspector_socket_server.cc, line 433.

1赞

原因是端口占用.
解决方法就是在AppDelegate.cpp中, 修改端口:
image
把6086改其他参数就行

3赞

该主题在最后一个回复创建后7天后自动关闭。不再允许新的回复。