mangstadt / ez-vcard

A vCard parser library for Java
Other
399 stars 92 forks source link

No static field V4_0 of type Lezvcard/VCardVersion #93

Closed thizisarun closed 6 years ago

thizisarun commented 6 years ago

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

mangstadt commented 6 years ago

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.

thizisarun commented 6 years ago

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