Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

The app crashes in release mode

See original GitHub issue

Hello Team,

The app work well in debug mode. But I have tried to build the app in release mode. The app crashes when updating the user.

java.lang.NullPointerException: Attempt to invoke virtual method 'org.greenrobot.greendao.AbstractDao org.greenrobot.greendao.AbstractDaoSession.getDao(java.lang.Class)' on a null object reference
        at Source:2)
        at Source:28)
        at Source:4)

-keep class** { *; }
-keep class org.greenrobot.** { *; }

-keepclassmembers class * extends org.greenrobot.greendao.AbstractDao {
    public static java.lang.String TABLENAME;
-keep class **$Properties { *; }

-keepclassmembers class * extends org.greenrobot.greendao.AbstractDaoSession { *; }
classpath ''
classpath ''

Android Studio 4.0

Pls help me to fix it!

Thanks, John

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

bensmileycommented, Aug 14, 2020

This is fixed in the latest version. You can also add the Proguard rules to your app’s proguard file:

# ChatSDK
-keep public class**,**,**, app.xmpp.**, co.chatsdk.** {
    public protected *;

-keep class org.ocpsoft.prettytime.i18n.**

-keep class .R
-keep class **.R$* {
# End
vpulpatilcommented, Aug 9, 2020

Any update on this @bensmiley ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

App crashes when select Release mode but in debug mode ...
android - App crashes when select Release mode but in debug mode works perfectly - Stack Overflow. Stack Overflow for Teams – Start...
Read more >
App crashes in release mode #954 - GitHub
When it's built, and when trying to use the camera, the apk crashes every time. This works perfectly on debug mode.
Read more >
Crash when run in Release mode? - Qt Forum
Try running your Release executable under debugger. When it crashes inside debugger you still get trace back. If you are lucky, and it...
Read more >
app crashes at launch as release b… | Apple Developer Forums
When you install the app to the device on debug mode or release mode through Xcode, it's normal and will not encounter this...
Read more >
Android App suddenly crashes when compiling in Release ...
Hi. My App was working fine when build to release mode, and both when downloading from Google play store or from a Android...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found