使用expo Metro Bundler選擇右邊選項"Run on Android device/emulator"時,
會出現"Couldn't start project on Android: could not install *smartsocket* listener: cannot bind to 127.0.0.1:5037: Only one usage of each socket address (protocol/network address/port) is normally permitted. (10048) could not read ok from ADB Server * failed to start daemon * error: cannot connect to daemon"錯誤訊息
解法:
1. 找出"Genymotion"中的"adb.exe"所在路徑
2. 點windows開始鍵,搜尋框中打入"環境",選擇"編輯您的環境變數"
3. 系統內容->進階->環境變數
4. 使用者的變數->選擇變數"Path"->編輯
5. 新增->把"adb.exe"所在路徑貼上->確定
6. 再重開一次Genymotion android模擬器和pexo start,即可正常呼叫
以下為原文
Hey guys. Hopefully I can help out. This is pretty straight forward once you know what to do.
20,000 foot view… Expo needs to know where to run the Android adb tool and it can only know via the operating systems Environment Variables.
There is NO NEED to install the anything from Google. Set up correctly everything works with only Expo and Genymotion.
First, figure out where Genymotion installs it’s version of the Android adb.exe tool.
For me, on Windows 10 64-bit, it’s C:\Program Files\Genymobile\Genymotion\tools
It’s kind pain to set the Environment Variables via command line, so we’ll do it in the GUI.
-
Close XDE, Expo CLI, and any other open command line terminals. They only pick up changes to Environment Variables upon opening.
-
Open your Start menu and type
environment
. You should see a quick link to the system environment variables. Open it. -
Click the
Environment Variables...
button. -
Select the Path variable in your user variables sections and click
Edit
.
-
Click
New
-
Add the path to the Android adb.exe tool installed by Genymotion.
-
Click
OK
,OK
,OK
to close all the way out and save. -
Start up the Genymotion virtual device.
-
Start up the Expo XDE and open a project.
-
Click
Device > Open on Android
-
Expo for Android will download, install on the device, and open!
轉自 https://forums.expo.io/t/genymotion-is-not-responding-error/547
--
--
留言列表