EPERM,不允许操作

时间:2015-04-01 18:04:53

标签: android compiler-errors titanium appcelerator

我使用钛和genymotion作为Android模拟器。我收到以下错误: -

[ERROR]触发“后执行”事件时出错 [错误]错误:EPERM,不允许操作'C:\ Users \ sudatta.titanium \ analytics_session.json'     在fs.openSync(fs.js:439:18)     在fs.writeFileSync(fs.js:978:15)     在c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ lib \ analytics.js:192:7     在c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ node_modules \ async \ lib \ async.js     at done(c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ node_modules \ async \ lib \ as     在c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ node_modules \ async \ lib \ async.js     在c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ node_modules \ async \ lib \ async.js     在c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ lib \ analytics.js:113:5     at getOSInfo(c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ lib \ environ.js:205:3

at async.parallel.osinfo(c:\ Users \ sudatta \ AppData \ Roaming \ npm \ node_modules \ titanium \ node_modules \ node-appc \ lib \ anal

at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:353:13
at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:563:6)
at conn.exec.bufferUntilClose (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js
at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:251
at Socket.emit (events.js:117:20)

at _stream_readable.js:944:16

at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:248:9)
at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:486:9)
at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:171
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:765:14)

在Socket.emit(events.js:92:17)

at Readable.on (_stream_readable.js:708:33)
at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:119:9)
at ADB.shell (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:482:7)
at ADB.getPid (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:552:7)
at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:343:15
at async.whilst (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:619:13)
at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:340:15

at conn.exec.bufferUntilClose(C:\ ProgramData \ Titanium \ mobilesdk \ win32 \ 3.5.1.GA \ node_modules \ titanium-sdk \ lib \ adb.js

at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:248:9)
at ADB.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:486:9)
at Connection.<anonymous> (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:171
at Socket.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:765:14)

在Socket.emit(events.js:92:17)

at Readable.on (_stream_readable.js:708:33)
at Connection.exec (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:119:9)
at ADB.shell (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:482:7)
at ADB.startApp (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\titanium-sdk\lib\adb.js:580:7)
at startApp (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:334:12)
at C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\android\cli\hooks\run.js:365:9
at iterate (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:134:13)
at async.eachSeries (C:\ProgramData\Titanium\mobilesdk\win32\3.5.1.GA\node_modules\async\lib\async.js:150:9)

我已经查了几篇关于genymotion bug的文章,但我的错误似乎并不相关。任何人都知道为什么突然出现这个错误。 我拥有文件analytics_session.json的权限。 谢谢。

2 个答案:

答案 0 :(得分:1)

也许你应该结束任务Nodejs,然后再尝试构建。发生这种情况是因为EventIO仍然附加到早期的构建过程。

答案 1 :(得分:0)

您正在尝试撰写一份您没有写入权限的文件。您似乎有一个文件句柄,您必须以读取模式打开它而不是写入。