Crash while initializing the Sugar Orm in Application file on 4.4 version
See original GitHub issueWhy 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:
- Created 8 years ago
- Comments:6 (3 by maintainers)
this worked for me:
the last line is essential as well.
I get the same crash, any updates?