问题
I am trying to debug my android application having some native(c++) code using ndk-gdb in eclipse.It seems that by gdb server starts successfully from command line and is taking commands. But in eclipse it is showing this error : Error while obtaining file from device com.android.ddmlib.SyncException: Writing local file failed
Any one help me please.
回答1:
It seems that the framework for debugging requires an obj/local/armeabi
folder.
If you open the launch file for native debugging, .metadata/.plugins/org.ecipse.debug.core/.launches/*.launch
, you'll see a reference in that xml file:
<stringAttribute key="org.eclipse.cdt.launch.PROGRAM_NAME" value="/projectroot/obj/local/armeabi/app_process"/>
Once I created this folder on disk this error subsided, and I was able to debug. There may be a more correct way to fix this, but I simply decided it was simple enough to create this folder.
回答2:
This question seems similar. Try some of the answers shown and see if they help.
来源:https://stackoverflow.com/questions/17317133/debugging-android-native-application-using-ndk-gdb