Android Studio 1.4无法启动调试服务器 [英] Android Studio 1.4 cannot launch debug server

查看:340
本文介绍了Android Studio 1.4无法启动调试服务器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用AS 1.4已经有一段时间了,新的本机调试功能特别有用.

I've been working with AS 1.4 for quite a while and new native debugging feature is especially useful.

但是,本机调试在我的Samsung Galaxy Note 10.1 2014(Android 4.4)上不起作用.当我尝试启动本机调试会话时,看到以下消息:

However native debugging does not work on my Samsung Galaxy Note 10.1 2014 (Android 4.4). When I try to start the native debugging session I see the following message:

Starting LLDB server: run-as com.example.hellojni /data/data/com.example.hellojni/lldb/bin/start_lldb_server.sh /data/data/com.example.hellojni/lldb /data/data/com.example.hellojni/lldb/tmp/platform.port1445003703353 "lldb process:gdb-remote packets"

Error while launching debug server on device: com.android.tools.ndk.run.DebuggerContext$StartServerException: java.lang.IllegalStateException:
Failed to read platform port /data/data/com.example.hellojni/lldb/tmp/platform.port1445003703353

我还发现了一个未解决的问题:

I also found an open issue: https://code.google.com/p/android/issues/detail?can=2&start=0&num=100&q=&colspec=ID%20Type%20Status%20Owner%20Summary%20Stars&groupby=&sort=&id=185061

有没有办法解决这个问题?

Is there a way to solve this?

推荐答案

请参见 https://code.google.com/p/android/issues/detail?id=187003

您需要在设备上具有root用户访问权限,但chmod 4750 /system/bin/run-as可能会解决问题.

You need root access on your device, but then chmod 4750 /system/bin/run-as may solve the problem.

如果您没有root用户访问权限,则可以使用Runtime.exec()修改应用程序,并使用包的身份启动LLDB服务器.

If you don't have root access, you can modify your app, and start LLDB server with your package's identity, using Runtime.exec().

这篇关于Android Studio 1.4无法启动调试服务器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆