error when try debug c++ ndk - android

when i try to debug c++ ndk in my android phone with android studio 1.5.this error occured:
Error while launching debug server on device: com.android.tools.ndk.run.DebuggerContext$StartServerException: java.lang.IllegalStateException: run-as is broken (please see http://b.android.com/187955 for details)
i read http://b.android.com/187955 but cant fixed this.
even i root my android phone to debugger root access but not fixed this issue.
any can help me?
thanks.

Related

Why is attaching gdbserver to a native android app failing?

I am developing a fully native application in using C++ and pure CMake as the build system - no Android Studio involved at all (proof of concept here)
The code builds, apk is generated and can be installed and run via ADB without issue but I cannot get gdbserver64 to attach to the process for debugging.
More details:
App is built against SDK/NDK API level 30
Attempting to debug on an Android 11 emulator instance without Google Play
I can run adb root just fine
Image already includes gdbserver and gdbserver64, attempting to use those
Developer options and USB debugging enebled in emulator
App has android:debuggable="true" in manifest
But every time I try gdbserver64 :5039 --attach $(pidof my.app.id)
I get /bin/sh: <app_pid>: inaccessible or not found
What am I missing? And no, I cannot just move to Android Studio - this is a cross platform project that needs to be buildable using only CMake.
According to my observation, this may be a bug of prebuilt gdbserver. It treats the parameter after --attach as a program name and tries to start it.
It's not really an answer, but in similar configuration to yours I got same error message and unable to overcome this. For me, switching to lldb helped, see e.g.

build android application using qt

I cannot run android application on android emulator, I got this error: Invalid json output from qmlimportscanner.
Every path are ok, without any space, jdk sdk and ndk are installed, so I really don't understand whye I got that error
Could someone help me?
Thank you

Android Emulator not showing app and emulator not found error

Well I would like to start my problem by stating that I have been trying to figure out what's wrong with my system(Windows 10) because Android Studio doesn't read the emulator properly or there is a file missing or some kind of error!
Also I performed several reinstallation of Android Studio. I formatted my system and did every possible thing for the emulator to work but the simple Hello World program doesn't run too.
The error message is:
Error: adb rejected command:
com.android.ddmlib.AdbCommandRejectedException: device 'emulator-5556'
not found.
Please help me guys, I am a beginner and I have stuck on my android classes because of this!
Thank You :(

log4cplus use in android application

I have integreted the log4cplus in my android application. Because I am a newbie in android platform, i have some problems.
In win32 platform , the fileappender will put the log file in the exe directory ,but in the android virtual device , I can't find the log file.
In win32 project ,the consoleappender will output the log to the console ,but in the andriod application, the log didn't output in the logcat window, it's puzzled me a lot .
Can some one get into the same troble before? please help me.
You can the android log api for sending log outputs.
refer this

When building android my linux box fails to build due to being unable to access site_perl

When I'm building android image my linux machine fails to build. The error is the following:
cannot access /tools/oss/packages/x86_64-2.6/subversion/default/perl5/lib/site_perl./5.8.8/*multi
Has anyone encountered this issue ?
Please let me know.

Categories

Resources