Re: [android-developers] Using Bouncy Castle with an Android app
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 8/28/10 00:55 , fba wrote:
>
>
> Or, could I get around this by making sure that I am using the
> same version that is included in the OS? (Or, in a nutshell, is
> the ClassCastException likely to be a problem because the
> parameters defined for the same method names don't match?)
I don't fully understand what's happening to you because more details
are needed, and generally speaking I think that Android would prevent
you from embedding in your app classes which are already present in
the runtime, but your problem seems to definitely fall within this area.
One possible solution (but it's about the symptom, not necessarily the
real cause and thus not necessarily the best solution) is to use a
static bytecode manipulator that renames packages in a jar. I use
Maven and there is the maven-shade-plugin, but I'm sure similar tools
exist for Ant. The basic idea is that if you have L.jar containing
com.acme.MyClass and A.jar referring to it, with the tool you can
directly feed in L.jar and A.jar and achieve L2.jar and A2.jar where
both the original class and its references have been replaced by
something such as foo.bar.com.acme.MyClass. This works for me (not for
BouncyCastle but for other stuff). With this trick, your source files
stay as they are, but the binary code gets fixed before being
converted to dex.
- --
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
java.net/blog/fabriziogiudici - www.tidalwave.it/people
Fabrizio.Giudici@tidalwave.it
-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.14 (Darwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAkx4SjMACgkQeDweFqgUGxfolwCfeStWh31mcmgzcRdjkcbCNA+Y
qOsAn0Twzw2rUyRDwSh5hT2UKyUD/dzK
=zjwJ
-----END PGP SIGNATURE-----
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home