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.

Could not read ZoneInfoMap. You are probably using Proguard wrong.

See original GitHub issue

Hi,

This is the stacktrace without any proguard rules

Caused by: java.lang.RuntimeException: Could not read ZoneInfoMap. You are probably using Proguard wrong.
                                                       at net.danlew.android.joda.a.a(JodaTimeAndroid.java:42)
Failed to retrieve identifier: type=class net.danlew.android.joda.b$a name=joda_zoneinfomap
                                                    java.lang.NoSuchFieldException: joda_zoneinfomap
                                                        at java.lang.Class.getField(Class.java:891)
                                                        at net.danlew.android.joda.c.a(ResUtils.java:105)
                                                        at net.danlew.android.joda.d.a(ResourceZoneInfoProvider.java:113)
                                                        at net.danlew.android.joda.d.<init>(ResourceZoneInfoProvider.java:38)
                                                        at net.danlew.android.joda.a.a(JodaTimeAndroid.java:39)

Using these rules solve the problem but I wonder what do you recommend

-dontwarn org.joda.convert.**
-dontwarn org.joda.time.**
-keep class org.joda.time.** { *; }
-keep interface org.joda.time.** { *; }
-keep class net.danlew.** { *; }

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Reactions:9
  • Comments:13 (4 by maintainers)

github_iconTop GitHub Comments

25reactions
Nitnatsnokcommented, Jan 21, 2020

Hello. I faced the same problem. I solved this by adding only one rule -keep class net.danlew.android.joda.R$raw { *; }

4reactions
dlewcommented, Sep 13, 2018

Well, in particular, it looks like the minifier is removing the resource joda_zoneinfomap. That should be kept, as per our resource keep rules: https://github.com/dlew/joda-time-android/blob/master/library/src/main/res/raw/joda_keep.xml

Read more comments on GitHub >

github_iconTop Results From Across the Web

Android : Proguard build is failing for joda time - Stack Overflow
It is implementation 'net.danlew:android.joda:2.8.2' Any idea why this ... RuntimeException: Could not read ZoneInfoMap at android.app.
Read more >
Could not read ZoneInfoMap. You are probably using ...
Hi,. This is the stacktrace without any proguard rules. Caused by: java.lang.RuntimeException: Could not read ZoneInfoMap. You are probably ...
Read more >
joda-time-android/library/src/main/java/net/danlew/android ...
throw new RuntimeException ( "Could not read ZoneInfoMap. You are probably using Proguard wrong." , e);. } context.getApplicationContext().
Read more >
org.joda.time.DateTimeZone.setProvider java code examples
How to use. setProvider ... catch (IOException e) { throw new RuntimeException("Could not read ZoneInfoMap. You are probably using Proguard wrong.
Read more >
ProGuard Troubleshooting
Note: can't find dynamically referenced class: ProGuard can't find a class or interface that your code is accessing by means of introspection. You...
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