The error is probably caused by a package name clash - it looks like you
didn't rename the bouncy castle package, and you should do that.

The bigger issue is that any application published through Android Market
has to compy with US export laws, including those that deal with
cryptography. I am not a lawyer, but I think there is a process you need to
go through for this.

This was already done by Google for the cryto code included in Android. If
you can use it without including a copy in your own application, do so.

-- Kostya

2011/4/4 Javier <[email protected]>

> Hello.
>
> My name is Javier and I have a question. I included into my Android
> project the BouncyCastle source code library.
>
> In one class of mine, I call to the constructor
> org.bouncycastle.asn1.cms.ContentInfo:
>
>     public ContentInfo (ASN1ObjectIdentifier contentType,
> DEREncodable content) {
>        this.contentType = contentType;
>        this.content = content;
>     }
>
> The class compile, but in running-time I have the following exception:
>
>     java.lang.NoSuchMethodError:
> org.bouncycastle.asn1.cms.ContentInfo.<init>
>
> I haven't got .class library, only .java files.
>
> The stacktrace is:
>
> 04-04 16:04:29.030: INFO/dalvikvm(847): DexOpt: illegal method access
> (call Lorg/bouncycastle/asn1/DERObjectIdentifier;.<init> ([B)V from
> Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;)
> 04-04 16:04:29.030: INFO/dalvikvm(847): Could not find method
> org.bouncycastle.asn1.DERObjectIdentifier.<init>, referenced from
> method org.bouncycastle.asn1.ASN1ObjectIdentifier.<init>
> 04-04 16:04:29.030: WARN/dalvikvm(847): VFY: unable to resolve direct
> method 38455: Lorg/bouncycastle/asn1/DERObjectIdentifier;.<init> ([B)V
> 04-04 16:04:29.030: DEBUG/dalvikvm(847): VFY: replacing opcode 0x70 at
> 0x0000
> 04-04 16:04:29.040: DEBUG/dalvikvm(847): VFY: dead code 0x0003-0003 in
> Lorg/bouncycastle/asn1/ASN1ObjectIdentifier;.<init> ([B)V
> 04-04 16:04:29.090: INFO/dalvikvm(847): Could not find method
> org.bouncycastle.asn1.cms.ContentInfo.<init>, referenced from method
>
> com.galeonsoftware.imae.cliente.core.signers.binary.GenSignedData.generateSignedData
> 04-04 16:04:29.090: WARN/dalvikvm(847): VFY: unable to resolve direct
> method 39015: Lorg/bouncycastle/asn1/cms/ContentInfo;.<init> (Lorg/
> bouncycastle/asn1/ASN1ObjectIdentifier;Lorg/bouncycastle/asn1/
> DEREncodable;)V
> 04-04 16:04:29.090: DEBUG/dalvikvm(847): VFY: replacing opcode 0x70 at
> 0x0097
> 04-04 16:04:29.090: INFO/dalvikvm(847): Could not find method
> org.bouncycastle.asn1.cms.ContentInfo.<init>, referenced from method
>
> com.galeonsoftware.imae.cliente.core.signers.binary.GenSignedData.generateSignedData
> 04-04 16:04:29.100: WARN/dalvikvm(847): VFY: unable to resolve direct
> method 39015: Lorg/bouncycastle/asn1/cms/ContentInfo;.<init> (Lorg/
> bouncycastle/asn1/ASN1ObjectIdentifier;Lorg/bouncycastle/asn1/
> DEREncodable;)V
>
> Does exist a solution?
>
> Thanks a lot.
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to