原生黑屏

编译后用xcode打开黑屏 报错如下

2019-08-04 20:15:30.633888+0800 cocos-mxd2-mobile[75183:11553656] info: CocosAnalytics ==> enableLoggin
Initializing JavaScriptCore
fullPathForFilename: No file found at jsb-adapter/jsb-builtin.jsc. Possible missing file.
JS: Enable batch GL commands optimization!
fullPathForFilename: No file found at main.jsc. Possible missing file.
fullPathForFilename: No file found at jsb-adapter/jsb-engine.jsc. Possible missing file.
fullPathForFilename: No file found at jsb-adapter/jsb-engine.js. Possible missing file.
ScriptEngine::runScript script jsb-adapter/jsb-engine.js, buffer is empty!
[ERROR] Failed to invoke require, location: /Applications/CocosCreator.app/Contents/Resources/cocos2d-x/cocos/scripting/js-bindings/manual/jsb_global.cpp:286
glGetIntegerv: pname: 0x8b4c
JS: Cocos Creator v2.1.0
In the constructor of HttpClient!
2019-08-04 20:15:32.410595+0800 cocos-mxd2-mobile[75183:11554080] NSURLConnection finished with error - code -1002
Response failed, error buffer: unsupported URL
JS: LoadScene 60bTOoKaVOxb5b4n0NdSJP: 67.63300000000004ms
JS: [ERROR]: Failed to load scene: Error: [AssetLibrary] loading JSON or dependencies failed: undefined
XMLHttpRequest_finalize, 0x7fa97df0b0f0 …

丢失了JS脚本,或者JS脚本出错,加载脚本失败。
可以在jsb_global.cpp:286这行代码进行断点调试,看看require什么脚本了

丢失了资源文件,这里提示JSON描述文件找不到。清除下项目缓存tmp和library目录,build目录,重新构建项目,这些操作,自己注意备份工程,免得丢失数据。