mangstadt/ez-vcard

No static field V4_0 of type Lezvcard/VCardVersion

Closed this issue · 2 comments

My app is crashed when i'm using below code

Ezvcard.write(mVCard).go(file)

I got below exception

java.lang.NoSuchFieldError: No static field V4_0 of type Lezvcard/VCardVersion; in class Lezvcard/VCardVersion; or its superclasses (declaration of 'ezvcard.VCardVersion' appears in /data/app/com.sample-1/base.apk) java.lang.Class.getDeclaredAnnotation(Native Method) java.lang.Class.getAnnotation(Class.java:2352) ezvcard.property.VCardProperty.getSupportedVersions(Unknown Source) ezvcard.property.VCardProperty.isSupportedBy(Unknown Source) ezvcard.io.StreamWriter.setVersionStrict(Unknown Source) prepare ezvcard.io.StreamWriter.write(Unknown Source) _write getTargetVersion setAddProdId setScribeIndex ezvcard.io.chain.ChainingTextWriter.go(Unknown Source) go go getVCardWriterConstructorVersion ezvcard.io.chain.ChainingTextWriter.go(Unknown Source) go go getVCardWriterConstructorVersion ezvcard.io.chain.ChainingTextWriter.go(Unknown Source) go go getVCardWriterConstructorVersion

I'm not sure what the problem could be. What version of ez-vcard are you using? Earlier versions did not support vCard version 4.0, which is what the error appears to be related to.

Thanks for your reply. I fixed the issues. It's occur because of proguard.