[英]ADB server didn't ACK on macOS
I am getting this error since two days ago when I updated my Android Studio to the latest stable version 2.3; 自从两天前我将Android Studio更新到最新的稳定版本2.3后,我收到此错误; the full error message I am getting from Gradle Console is:
我从Gradle Console获得的完整错误消息是:
07:59:59 E/adb: error: could not install *smartsocket* listener: Address already in use
07:59:59 E/adb: ADB server didn't ACK
07:59:59 E/adb: * failed to start daemon *
07:59:59 E/adb: error: cannot connect to daemon
07:59:59 E/ddms: '/Users/USER_NAME/Library/Android/sdk/platform-tools/adb start
server' failed -- run manually if necessary
My attempts to solve the issue: 我试图解决这个问题:
kill all adb
processes and make sure no process is holding port 5037, adb kill-server
(says * server not running *
even in cases when adb is running), close Android Studio, delete ~/.android
directory, run adb start-server
(says * daemon not running. starting it now at tcp:5037 *; * daemon started successfully *
, start Android Studio and run application, MAC throws error adb quit unexpectedly
and gradle console shows same the error I posted above. 杀死所有
adb
进程并确保没有进程持有端口5037, adb kill-server
(即使在运行adb的情况下* server not running *
),关闭Android Studio,删除~/.android
目录,运行adb start-server
(说* daemon not running. starting it now at tcp:5037 *; * daemon started successfully *
,启动Android Studio并运行应用程序,MAC抛出错误adb quit unexpectedly
,gradle控制台显示我上面发布的错误。
uninstalled and deleted all Android Studio stuff (except for projects directory), restarted MAC, installed fresh and latest android studio. 卸载并删除所有Android Studio的东西 (项目目录除外),重启MAC,安装新的和最新的android studio。
increased gradle vm ram org.gradle.jvmargs=-Xmx1536M
in project gradle.properties
在项目
gradle.properties
增加了gradle vm ram org.gradle.jvmargs=-Xmx1536M
gradle.properties
uninstalled antivirus and restarted the mac 卸载防病毒软件并重新启动mac
Environment: 环境:
Address already in use
means you have another instance of adb running. Address already in use
意味着您有另一个adb实例正在运行。 Check your system variable $PATH
and $ANDROID_HOME
and local.properties
file (of your project) and your .bash_profile . 检查系统变量
$PATH
和$ANDROID_HOME
以及local.properties
文件(项目的)和.bash_profile。 Make sure that all of these has same android sdk path. 确保所有这些都具有相同的android sdk路径。 Then try restarting the adb server.
然后尝试重新启动adb服务器。
adb kill-server
and adb start-server
. adb kill-server
和adb start-server
。
I read that you killed the adb, but as this answer says How to resolve the "ADB server didn't ACK" error? 我读到你杀了adb,但是这个答案说如何解决“ADB服务器没有确认”错误? did you do that from the platform-tools folder?
你是从platform-tools文件夹那样做的吗? If your answer is yes, update the Android SDK to the lastest version via the SDK manager and update the $ANDROID_HOME
如果您的答案是肯定的,请通过SDK管理器将Android SDK更新为最新版本并更新$ ANDROID_HOME
I hope it helps! 我希望它有所帮助!
I usually find this issue occurring when I have two instances of ADB working, ie when I have my Eclipse and Android studio running at the same time AND when they point to different SDK Manager(platform-tools folder) on the system. 我经常发现这个问题发生在我有两个ADB实例工作时,即当我同时运行我的Eclipse和Android工作室时以及当他们指向系统上的不同SDK Manager(platform-tools文件夹)时。 Try to search for what other IDE is using ADB, kill it in the Activity Monitor and run only one instance.
尝试搜索其他IDE正在使用ADB,在活动监视器中将其终止并仅运行一个实例。 Or my work around was to have only one SDK Manager and point both my IDEs to one platform-tools folder.
或者我的工作是只有一个SDK Manager并将我的IDE指向一个platform-tools文件夹。
Hope that helps. 希望有所帮助。
Just write down platform-tools path (/Users/USER_NAME/Library/Android/sdk/platform-tools) In the .bash_profile file, located at (/Users/USER_NAME/.bash_profile), like this : 只需写下平台工具路径(/ Users / USER_NAME / Library / Android / sdk / platform-tools),位于(/Users/USER_NAME/.bash_profile)的.bash_profile文件中,如下所示:
export PATH="$PATH:/Users/USER_NAME/Library/Android/sdk/platform-tools" export PATH =“$ PATH:/ Users / USER_NAME / Library / Android / sdk / platform-tools”
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.