My workaround was to remove some local variables by referring to the original array indexes.
W/dalvikvm(24430): Invalid reg type for array index (1098902008)
W/dalvikvm(24430): VFY: rejected Lorg/whispersystems/curve25519/java/fe_mul;.fe_mul ([I[I[I)V
W/dalvikvm(24430): VFY: rejecting opcode 0x44 at 0x0008
W/dalvikvm(24430): VFY: rejected Lorg/whispersystems/curve25519/java/fe_mul;.fe_mul ([I[I[I)V
W/dalvikvm(24430): Verifier rejected class Lorg/whispersystems/curve25519/java/fe_mul;
D/AndroidRuntime(24430): Shutting down VM
W/dalvikvm(24430): threadid=1: thread exiting with uncaught exception (group=0x4180cc08)
E/AndroidRuntime(24430): FATAL EXCEPTION: main
E/AndroidRuntime(24430): Process: com.xxxx.communicator, PID: 24430
E/AndroidRuntime(24430): java.lang.VerifyError: org/whispersystems/curve25519/java/fe_mul
E/AndroidRuntime(24430): at org.whispersystems.curve25519.java.ge_madd.ge_madd(ge_madd.java:65)
E/AndroidRuntime(24430): at org.whispersystems.curve25519.java.ge_scalarmult_base.ge_scalarmult_base(ge_scalarmult_base.java:96)
E/AndroidRuntime(24430): at org.whispersystems.curve25519.java.curve_sigs.curve25519_keygen(curve_sigs.java:30)
E/AndroidRuntime(24430): at org.whispersystems.curve25519.BaseJavaCurve25519Provider.generatePublicKey(BaseJavaCurve25519Provider.java:50)
E/AndroidRuntime(24430): at org.whispersystems.curve25519.JavaCurve25519Provider.generatePublicKey(JavaCurve25519Provider.java:8)
E/AndroidRuntime(24430): at org.whispersystems.curve25519.OpportunisticCurve25519Provider.generatePublicKey(OpportunisticCurve25519Provider.java:27)
E/AndroidRuntime(24430): at org.whispersystems.curve25519.Curve25519.generateKeyPair(Curve25519.java:70)
E/AndroidRuntime(24430): at org.whispersystems.libaxolotl.ecc.Curve.generateKeyPair(Curve.java:35)
When I upgraded my Android app to depend on build tools 22.0.1 I got this exception (see below) on my device.
I believe it is the same problem described in the response here: http://stackoverflow.com/questions/26685636/what-causes-the-android-dalvik-java-lang-verifyerror-invalid-reg-type-for-array
My workaround was to remove some local variables by referring to the original array indexes.
W/dalvikvm(24430): Invalid reg type for array index (1098902008) W/dalvikvm(24430): VFY: rejected Lorg/whispersystems/curve25519/java/fe_mul;.fe_mul ([I[I[I)V W/dalvikvm(24430): VFY: rejecting opcode 0x44 at 0x0008 W/dalvikvm(24430): VFY: rejected Lorg/whispersystems/curve25519/java/fe_mul;.fe_mul ([I[I[I)V W/dalvikvm(24430): Verifier rejected class Lorg/whispersystems/curve25519/java/fe_mul; D/AndroidRuntime(24430): Shutting down VM W/dalvikvm(24430): threadid=1: thread exiting with uncaught exception (group=0x4180cc08) E/AndroidRuntime(24430): FATAL EXCEPTION: main E/AndroidRuntime(24430): Process: com.xxxx.communicator, PID: 24430 E/AndroidRuntime(24430): java.lang.VerifyError: org/whispersystems/curve25519/java/fe_mul E/AndroidRuntime(24430): at org.whispersystems.curve25519.java.ge_madd.ge_madd(ge_madd.java:65) E/AndroidRuntime(24430): at org.whispersystems.curve25519.java.ge_scalarmult_base.ge_scalarmult_base(ge_scalarmult_base.java:96) E/AndroidRuntime(24430): at org.whispersystems.curve25519.java.curve_sigs.curve25519_keygen(curve_sigs.java:30) E/AndroidRuntime(24430): at org.whispersystems.curve25519.BaseJavaCurve25519Provider.generatePublicKey(BaseJavaCurve25519Provider.java:50) E/AndroidRuntime(24430): at org.whispersystems.curve25519.JavaCurve25519Provider.generatePublicKey(JavaCurve25519Provider.java:8) E/AndroidRuntime(24430): at org.whispersystems.curve25519.OpportunisticCurve25519Provider.generatePublicKey(OpportunisticCurve25519Provider.java:27) E/AndroidRuntime(24430): at org.whispersystems.curve25519.Curve25519.generateKeyPair(Curve25519.java:70) E/AndroidRuntime(24430): at org.whispersystems.libaxolotl.ecc.Curve.generateKeyPair(Curve.java:35)