The :5039 tells gdb to connect to the localhost port 5039, which is bridged to the device by adb.
You may need to inspire gdb to load some symbols by typing:
(gdb)shared
xx
FAQ
Debug on Device Window: Install USB driver for the device Linux: Add USB configure file under /etc/udev/xxx following the steps at http://developer.android.com/guide/developing/device.html, and then execute 'adb usb && adb kill-server && adb start-server' as super user.
[Q] Can't find proguard.cfg under /tools/lib when to create Android project. [A] 1st Way: - Eclipse--->Window--->Android SDK And AVD Manager(或者直接在Android解压目录底下运行SDK Setup.exe) - 选择installed packages,在右边列表中选择SDK tools ,点击 update all
2nd Way: Create the file proguard.cfg with the following contents:
-keep public class * extends android.app.Activity
-keep public class * extends android.app.Application
-keep public class * extends android.app.Service
-keep public class * extends android.content.BroadcastReceiver
-keep public class * extends android.content.ContentProvider
-keep public class com.android.vending.licensing.ILicensingService
-keepclasseswithmembernames class * {
native ;
}
-keepclasseswithmembernames class * {
public (android.content.Context, android.util.AttributeSet);
}
-keepclasseswithmembernames class * {
public (android.content.Context, android.util.AttributeSet, int);
}
-keepclassmembers enum * {
public static **[] values();
public static ** valueOf(java.lang.String);
}
-keep class * implements android.os.Parcelable {
public static final android.os.Parcelable$Creator *;
}
[Q]When to run application on Android Emulator 2.0, Android reports error: android.view.InflateException: Binary XML file line #xxx: Error inflating class xxx" ................... android.content.res.Resources$NotFoundException: File res/drawable/title_bar_shadow.9.png from drawable resource ID xxx ................
The details error messages are: ================================= 08-01 21:03:10.510: ERROR/AndroidRuntime(914): Uncaught handler: thread main exiting due to uncaught exception
08-01 21:03:10.550: ERROR/AndroidRuntime(914):
java.lang.RuntimeException: Unable to start activity
ComponentInfo{com.tek.apps.android.theawayteam/com.tek.apps.android.blah.Blahhome}:
android.view.InflateException: Binary XML file line #2: Error inflating
class java.lang.reflect.Constructor
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2268)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2284)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.app.ActivityThread.access$1800(ActivityThread.java:112)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1692)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.os.Handler.dispatchMessage(Handler.java:99)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.os.Looper.loop(Looper.java:123)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.app.ActivityThread.main(ActivityThread.java:3948)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at java.lang.reflect.Method.invokeNative(Native Method)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at java.lang.reflect.Method.invoke(Method.java:521)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:782)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:540)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at dalvik.system.NativeStart.main(Native Method)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): Caused by:
android.view.InflateException: Binary XML file line #2: Error inflating
class java.lang.reflect.Constructor
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.LayoutInflater.createView(LayoutInflater.java:512)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at
com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:562)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.LayoutInflater.inflate(LayoutInflater.java:385)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.LayoutInflater.inflate(LayoutInflater.java:276)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at
com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:309)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.app.Activity.setContentView(Activity.java:1626)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at
com.tek.apps.android.theawayteam.football.FootballHome.onCreate(FootballHome.java:17)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at
android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1123)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2231)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): … 11 more
08-01 21:03:10.550: ERROR/AndroidRuntime(914): Caused by: java.lang.reflect.InvocationTargetException
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.widget.LinearLayout.(LinearLayout.java:92)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at java.lang.reflect.Constructor.constructNative(Native Method)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at java.lang.reflect.Constructor.newInstance(Constructor.java:446)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.LayoutInflater.createView(LayoutInflater.java:499)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): … 21 more
08-01 21:03:10.550: ERROR/AndroidRuntime(914): Caused by:
android.content.res.Resources$NotFoundException: File
res/drawable/title_bar_shadow.9.png from drawable resource ID
#0x7f02000c
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.content.res.Resources.loadDrawable(Resources.java:1641)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.content.res.TypedArray.getDrawable(TypedArray.java:548)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.View.(View.java:1725)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.View.(View.java:1674)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.view.ViewGroup.(ViewGroup.java:271)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): … 25 more
08-01 21:03:10.550: ERROR/AndroidRuntime(914): Caused by: java.io.FileNotFoundException: res/drawable/title_bar_shadow.9.png
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.content.res.AssetManager.openNonAssetNative(Native Method)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.content.res.AssetManager.openNonAsset(AssetManager.java:392)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): at android.content.res.Resources.loadDrawable(Resources.java:1634)
08-01 21:03:10.550: ERROR/AndroidRuntime(914): … 29 more
[A]Its looks like a packing/extraction problem. The way to solve
this is to rename your drawable-mdpi folder to drawable.