简体   繁体   中英

Appcelerator Studio / Titanium: Error: Failed to start ADB (code 255): ADB server didn't ACK

I get the following error when trying to run my app on a Genymotion Emulator. I've tried following the steps in their Genymotion setup guide ; I changed the ADB location to a spot where I downloaded the Android SDK on my hard drive, however I still get the error.

Does Appcelerator Studio keep their own Android SDK somewhere, perhaps I should choose that?

[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)

I found out that I had set the Android SDK path in my Genymotion settings to a different one than Appcelerator Studio was using, as there was an Android SDK directory in my Documents that I had downloaded separately.

Here's how I found the location of Appcelerator Studio's version of Android SDK and solved the issue in Genymotion:

  1. In Appcelerator Studio go to Preferences > Studio > Platforms > Android
  2. Copy the path of the Android SDK Home
  3. In Genymotion go to Settings > ADB > Use custom Android SDK tools
  4. Paste the path in the field below

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM