Closed Manjur13 closed 1 year ago
Please add some context to your problem, for example:
I have a same crash i used in React native,but crash ` implementation group: 'net.time4j', name: 'time4j-android', version: '4.8-2021a'
public class DatePickerModule extends LegoRNJavaModule {
public DatePickerModule(ReactApplicationContext context) {
super(context);
ApplicationStarter.initialize(context, false); // false = no need to prefetch on time data background tread
}
`
java.lang.NoClassDefFoundError
This must be a proguard issue with your configuration. Maybe you might solve it with adding following line to your proguard file:
-keep class net.time4j.base.ResourceLoader
Of course, if you don't apply Proguard at all, then your problem will surely go away (what you can do at least for testing if this is really a proguard issue).
This must be a proguard issue with your configuration. Maybe you might solve it with adding following line to your proguard file:
-keep class net.time4j.base.ResourceLoader
Of course, if you don't apply Proguard at all, then your problem will surely go away (what you can do at least for testing if this is really a proguard issue).
now I add -keep class net.time4j.base.ResourceLoader -keep public class * extends net.time4j.base.ResourceLoader , before i added two keep -keep public class net.time4j.android.ApplicationStarter -keep public class net.time4j.PrettyTime
and now i modify ApplicationStarter.initialize in the Applicaion oncreate() ApplicationStarter.initialize(application, false); the second params is false ok?
Have you now tested your new proguard setup? Anyway, if your proguard configuration does not ignore the project file consumer-proguard-rules then you should really not observe any problems. My impression is: Your project setup seems to ignore or override this important file.
I cannot reproduce your error.
I close this issue as not reproducible.
java.lang.ExceptionInInitializerError at net.time4j.base.ResourceLoader.getInstance(ResourceLoader.java:139)