Appcelerator Studio / Titanium:错误:无法启动ADB(代码255):ADB服务器未确认

时间:2016-01-25 20:19:26

标签: android titanium adb appcelerator appcelerator-titanium

尝试在Genymotion仿真器上运行我的应用程序时出现以下错误。我已经尝试过他们的Genymotion中的步骤setup guide;我将ADB位置更改为我在硬盘上下载Android SDK的位置,但是我仍然收到错误。

Appcelerator Studio是否将自己的Android SDK保留在某处,也许我应该选择它?

[ERROR] :  Error: Failed to start ADB (code 255): ADB server didn't ACK
* failed to start daemon *
    at /Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/titanium-sdk/lib/adb.js:460:30
    at ChildProcess.<anonymous> (/Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/node-appc/lib/subprocess.js:60:3)
    at ChildProcess.emit (events.js:110:17)
    at maybeClose (child_process.js:1015:16)
    at Socket.<anonymous> (child_process.js:1183:11)
    at Socket.emit (events.js:107:17)
    at Pipe.close (net.js:485:12)
---------------------------------------------
    at Object.run (/Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/node-appc/lib/subprocess.js:59:8)
    at /Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/titanium-sdk/lib/adb.js:459:19
    at /Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/titanium-sdk/lib/adb.js:445:4
    at Object.detect (/Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/titanium-sdk/lib/android.js:67:44)
    at androidDetect (/Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/titanium-sdk/lib/adb.js:437:25)
    at ADB.startServer (/Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/titanium-sdk/lib/adb.js:457:2)
    at /Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/cli/hooks/run.js:137:10
    at /Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/async/lib/async.js:689:13
    at iterate (/Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/node_modules/async/lib/async.js:265:13)
---------------------------------------------
    at /Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:275:35
    at /Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:44:16
    at /Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:694:17
    at /Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:173:37
    at /Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/lib/hook.js:239:9
    at cli.on.post (/Users/owen/Library/Application Support/Titanium/mobilesdk/osx/5.1.2.GA/android/cli/hooks/package.js:21:51)
    at /Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/lib/hook.js:235:13
    at /Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:689:13
    at iterate (/Users/owen/.appcelerator/install/5.1.0/package/node_modules/appc-cli-titanium/node_modules/titanium/node_modules/async/lib/async.js:265:13)

1 个答案:

答案 0 :(得分:3)

我发现我将Genymotion设置中的Android SDK路径设置为与Appcelerator Studio使用的路径不同,因为我的文档中有一个Android SDK目录,我已单独下载。

以下是我如何找到Appcelerator Studio的Android SDK版本的位置并解决了Genymotion中的问题:

  1. 在Appcelerator Studio中,转到Preferences > Studio > Platforms > Android
  2. 复制Android SDK Home的路径
  3. 在Genymotion中转到Settings > ADB > Use custom Android SDK tools
  4. 将路径粘贴到
  5. 下面的字段中