问题
I am using ProGuard to obfuscate and shrink my app and everything seems to work fine for me and 99% of my users but once in a while I get a report from a user who isn't able to run my app at all. It crashes with the following pattern:
01-05 13:20:57.273 W/dalvikvm(22002): Class resolved by unexpected DEX: MyClass;(0x418d1200):0x1d3ef00 ref [Lorg/apache/commons/lang3/time/FastDateFormat;] Lorg/apache/commons/lang3/time/FastDateFormat;(0x418d1200):0x1d5ebf8
01-05 13:20:57.273 W/dalvikvm(22002): (MyClass; had used a different Lorg/apache/commons/lang3/time/FastDateFormat; during pre-verification)
01-05 13:20:57.273 W/dalvikvm(22002): Exception Ljava/lang/IllegalAccessError; thrown while initializing MyClass;
I replaced the actual class name with MyClass. Obviously I'm using Apache Commons Lang in my project and FastDateFormat
seems to cause the problem. I can't reproduce the crash no matter what.
I read questions with similar problems but they all focused on the Maps API or the Support library and also occured unconditionally. My problem seems to appear for a very tiny fraction of my users and especially not me.
Any ideas?
来源:https://stackoverflow.com/questions/15014186/irreproducible-error-class-had-used-a-different-during-pre-verification