在尝试在模拟器上进行调试时,我不断收到此错误。
我尝试过以下解决方案但没有成功:
1)确保端口8600+打开并带有kill 2)在调试构建类型上添加debuggable true 3)重启Android工作室和我的mac 4)增加了许可
<uses-permission android:name="android.permission.SET_DEBUG_APP" />
操作系统: - 优胜美地
Android Studio: - 1.5.1
使用的API: - 23
模拟器上的
Device connected: emulator-5554
Device is ready: Nexus_5_API_23_x86 [emulator-5554]
Target device: Nexus_5_API_23_x86 [emulator-5554]
Installing APK: /Users/Abhishek/AndroidStudioProjects/Sunshine/app/build/outputs/apk/app-debug.apk
Uploading file to: /data/local/tmp/sunshine.messy.com.sunshine
Installing sunshine.messy.com.sunshine
DEVICE SHELL COMMAND: pm install -r "/data/local/tmp/sunshine.messy.com.sunshine"
pkg: /data/local/tmp/sunshine.messy.com.sunshine
Success
启动应用程序:
sunshine.messy.com.sunshine/sunshine.messy.com.sunshine.MainActivity.
DEVICE SHELL COMMAND: am start -D -n "sunshine.messy.com.sunshine/sunshine.messy.com.sunshine.MainActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Debug port is busy
Debug port is busy
Debug port is busy
Debug port is busy
Debug port is busy
Debug port is busy
Debug port is busy
Debug port is busy
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=sunshine.messy.com.sunshine/.MainActivity }
01-30 11:28:43.185 2416-2416/sunshine.messy.com.sunshine I/art: Not late-enabling -Xcheck:jni (already on)
01-30 11:28:43.228 2416-2416/sunshine.messy.com.sunshine W/ActivityThread: Application sunshine.messy.com.sunshine is waiting for the debugger on port 8100...
01-30 11:28:43.233 2416-2416/sunshine.messy.com.sunshine I/System.out: Sending WAIT chunk
答案 0 :(得分:0)
为了解决这个问题,我意识到我最近更改了Mac的计算机名称。
将计算机名称更改回原来的状态(系统偏好设置 - >分享 - >计算机名称),我现在可以再次通过Android Studio调试应用程序。