问题描述
我正在使用本教程创建我的第一个 react-native 项目:http://facebook.github.io/react-native/
I'm creating my first react-native project with this tutorial: http://facebook.github.io/react-native/
当谈到执行代码和运行 react-native run-android
我得到:
When it comes to executing code and running react-native run-android
I am getting:
adb server is out of date. killing...
* daemon started successfully *
Android 设备上的应用程序显然无法运行.
And the app on the android device is obviously not working.
我重新安装了 SDK,尝试 adb kill-server
和 adb start-server
,但似乎没有任何效果
I've reinstalled the SDK, tried to adb kill-server
and adb start-server
, but nothing seems to work
我使用的是 Android 4.4 和 Ubuntu 14.04
I'm using Android 4.4 and Ubuntu 14.04
推荐答案
打开 Android Studio,然后更新所有构建工具,安装设备所需的 SDK,并确保设置了 ANDROID_HOME
env var 到您在 Android Studio 中的相同目录(通常在 /home/you/Android/Sdk
中),同时更新 react-native-cli 节点包.运行 adb kill-server
和 adb start-server
.
Open Android Studio, and then update all your build tools, install the SDKs that you need for your device and ensure that have you set ANDROID_HOME
env var to the same dir that you have in Android Studio (commonly in /home/you/Android/Sdk
), also update react-native-cli node package. Run adb kill-server
and adb start-server
.
可能你的 adb 版本会有问题,换个 bin 就好了:
Probably you will have problems with adb version, just change your bin:
sudo cp ~/Android/Sdk/platform-tools/adb/usr/bin/adb
sudo chmod +x/usr/bin/adb
这篇关于adb 服务器已过时.杀戮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!