Eray
Eray

Reputation: 7128

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.)

Upvotes: 2

Views: 3131

Answers (2)

Sackurise
Sackurise

Reputation: 2814

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 e.g: 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.** { *; }

Upvotes: 0

Eray
Eray

Reputation: 7128

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.

Upvotes: 1

Related Questions