要查找原因,我首先从" info"设置通知级别。到"调试"现在,这在编译应用程序时显示在控制台中:`2017-01-14T08:25:42.969Z |错误|一个未被捕获的异常被抛出! 无法读取属性'可执行文件'为null 2017-01-14T08:25:42.970Z |错误|无法读取属性'可执行文件'为null 2017-01-14T08:25:42.970Z |追踪| TypeError:无法读取属性'可执行文件'为null at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / lib / simulator.js:174:49 at fireCallbacks(/ Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / lib / xcode.js:105:5) at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / lib / xcode.js:502:11 at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:3694:9 at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:356:16 补充(/ Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:877:25) 在iterateeCallback(/ Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:867:17) at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:840:16 at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:3691:13 at apply(/ Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:21:25) at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:56:12 at / Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:356:16 at eachOfArrayLike(/ Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:929:9) at eachOf(/ Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:991:5) at Object.eachLimit(/ Users / kings / Library / Application Support / Titanium / mobilesdk / osx / 6.0.2.v20161221155621 / node_modules / ioslib / node_modules / async / dist / async.js:3089:3)
at Object.run (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:59:8)
at find (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:96:14)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:987:13
at Immediate.q.process (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:953:21)
at Object.setImmediate (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at _insert (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:890:19)
at Object.q.push (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:927:17)
at Object.findExecutable (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:113:8)
at findTeams (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/xcode.js:405:21)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3686:9
at replenish (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:882:17)
at iterateeCallback (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:867:17)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:840:16
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3691:13
at apply (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:21:25)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:56:12
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:356:16
at replenish (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:877:25)
at Object.run (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:59:8)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/xcode.js:222:22
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/env.js:98:4
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3694:9
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:356:16
at iterateeCallback (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:865:24)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:840:16
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3691:13
at apply (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:21:25)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:56:12
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/env.js:76:6
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:100:8
at ChildProcess.<anonymous> (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:60:3)
at Object.run (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:59:8)
at find (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:96:14)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:987:13
at Immediate.q.process (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:953:21)
at Object.setImmediate (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:194:9)
at _insert (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:890:19)
at Object.q.push (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/node_modules/async/lib/async.js:927:17)
at Object.findExecutable (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/node-appc/lib/subprocess.js:113:8)
at async.parallel.security (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/env.js:64:21)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3686:9
at replenish (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:882:17)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:886:9
at eachOfLimit (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:913:22)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:918:16
at eachOf (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:991:5)
at _parallel (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3685:5)
at Object.parallelLimit [as parallel] (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3765:3)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/env.js:62:9
at magik (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/utilities.js:51:13)
at Object.detect (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/env.js:49:9)
at detectOSXenv (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/xcode.js:207:9)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3686:9
at replenish (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:882:17)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:886:9
at eachOfLimit (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:913:22)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:918:16
at _parallel (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3685:5)
at Object.series (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:4525:3)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/xcode.js:204:9
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/utilities.js:66:17
at nextTickCallbackWith0Args (node.js:436:9)
at magik (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/utilities.js:51:13)
at Object.detect (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/xcode.js:98:27)
at detectXcode (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/index.js:114:11)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3686:9
at eachOfArrayLike (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:941:9)
at eachOf (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:991:5)
at _parallel (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3685:5)
at Object.parallelLimit [as parallel] (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/node_modules/async/dist/async.js:3765:3)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/index.js:76:9
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/utilities.js:66:17
at nextTickCallbackWith0Args (node.js:436:9)
at magik (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/lib/utilities.js:51:13)
at Object.detect (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/ioslib/index.js:46:9)
at iOSBuilder.<anonymous> (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/iphone/cli/commands/_build.js:329:10)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/titanium-sdk/lib/titanium.js:99:5
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/async/dist/async.js:3671:13
at eachOfArrayLike (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/async/dist/async.js:1002:13)
at eachOf (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/async/dist/async.js:1052:9)
at _parallel (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/async/dist/async.js:3670:9)
at Object.parallelLimit [as parallel] (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/async/dist/async.js:3750:7)
at Object.exports.platformOptions (/Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/node_modules/titanium-sdk/lib/titanium.js:76:8)
at /Users/kings/Library/Application Support/Titanium/mobilesdk/osx/6.0.2.v20161221155621/cli/commands/build.js:49:7
at /Users/kings/.appcelerator/install/6.1.0/package/node_modules/titanium/lib/hook.js:256:13
at /Users/kings/.appcelerator/install/6.1.0/package/node_modules/titanium/node_modules/async/dist/async.js:3853:9
at /Users/kings/.appcelerator/install/6.1.0/package/node_modules/titanium/node_modules/async/dist/async.js:484:16
at replenish (/Users/kings/.appcelerator/install/6.1.0/package/node_modules/titanium/node_modules/async/dist/async.js:1025:25)
`
答案 0 :(得分:0)
可能你改变了Xcode的位置。尝试使用命令设置正确的位置:
sudo xcode-select -switch /path_to/Xcode.app/Contents/Developer
答案 1 :(得分:0)
我解决了这个问题! (对我来说至少)
我所做的就是删除(存档)工作区(例如〜/ Document / Appcelerator_Studio_Workspace
我认为问题与工作空间中的某种缓存有关。自从我删除它后,我可以轻松地构建所有模拟器和设备。
祝你好运!答案 2 :(得分:0)
Xcode丢失导致我错误。虽然我只为Android构建了,这有点奇怪。