简体   繁体   中英

Android App working well with DEBUG mode, but not with RUN mode

My Android application crashing when i push a button. I want to debug it with LogCat but when i plug my usb cable and start debug mode (inside Eclipse) it's working well. I'm pushing button but it's not crashing. Also it's crashing when i RUN app in Eclipse. Again when i unplug cable and start app it's crashing.

In shortly,

  1. It working with Eclipse's DEBUG mode
  2. It's NOT working with Eclipse's RUN mode
  3. It's not working when unplug cable and launch app from phone's apps list.

It's weird. Now, how can i debug this problem?

(I've tried with 3 different devices.)

I follow this steps and now it's working

  1. Plugged phone
  2. Start RUN mode
  3. Open DDMS perspective
  4. Select my application from Devices panel, under my device's name
  5. Open DEBUG perspective

    Now it's outputting errors.

Fixed my errors and now it's working but i've no idea why i wasn't working only debug mode and not working with run mode.

My problem solved with this steps.

Thank you.

The First thing, yout have to check for the proguard.pro files, whether you have included the proguard rules for the dependencies and external library used in your file.

For eg: If you are using Gson library it is must you have to include below line in proguard file.

-keepattributes Signature

-keep class sun.misc.Unsafe { *; }

-keep class com.google.gson.stream.** { *; }

-keep class com.yourpackage.model_parseclasspackage.** { *; }

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM