question-mark
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.

Crash while initializing the Sugar Orm in Application file on 4.4 version

See original GitHub issue

Why i am getting this crash while launching this. It get crashed on 4.4. Please let me know the solution soon…

java.lang.NoClassDefFoundError: com.orm.SugarDb at com.orm.Database.<init>(Database.java:12) at com.orm.SugarApp.onCreate(SugarApp.java:11) at com.myapp.app.UI.activities.MyApplication.onCreate(MyApplication.java:21) at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1013) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4893) at android.app.ActivityThread.access$1600(ActivityThread.java:174) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1385) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:146) at android.app.ActivityThread.main(ActivityThread.java:5756) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:515) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1291) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1107) at dalvik.system.NativeStart.main(Native Method)


public class MyApplication extends SugarApp {

@Override
public void onCreate() {
    super.onCreate();
    CalligraphyConfig.initDefault(new CalligraphyConfig.Builder()
                    .setDefaultFontPath("fonts/arial.ttf")
                    .setFontAttrId(R.attr.fontPath)
                    .build()
    );
}

}

Issue Analytics

  • State:closed
  • Created 8 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
NoelChewcommented, Nov 26, 2015

this worked for me:

-keep public class * extends com.orm.SugarRecord
-keep class com.orm.** { *; }
-dontwarn com.google.common.**

the last line is essential as well.

0reactions
albert0mcommented, Jun 28, 2018

I get the same crash, any updates?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android - Sugar ORM Save Crash - Stack Overflow
I am trying to integrate Sugar ORM (v 1.3) into my Android app and I keep getting a crash (NullPointerException) when trying to...
Read more >
Clean Persistence with Sugar ORM - CodePath Cliffnotes
Sugar ORM is a database persistence library that provides a simple and concise way to integrate your application models into SQLite.
Read more >
[APP][4.0.3+] ApkTrack 2.0.2 - Automatic update checks for ...
Bugfixes - Fixed a widespread crash triggered during the initialization of the app. - Fixed a problem with icon resizing for devices with ......
Read more >
PowerDNS Authoritative Server Documentation
The PowerDNS Authoritative Server is a versatile nameserver which supports a large number of backends. These backends can either be plain zone files...
Read more >
Bug List
580896, ECF, ecf.file, ecf.core-inbox ... NEW, ---, assertion failed: The application has not been initialized during unit test execution via ...
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 Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found