You should enable the extended JNI checking by following the instructions at the Android JNI tips page (i.e., adb shell setprop debug.checkjni 1 ). Or you can run your code on the emulator which already has the CheckJNI facility enabled. Typically, after enabling that, looking at the logcat output will give you the exact reason a JNI call is crashing.
Also, between invocations of Java methods you should do:
In this specific case, it appears you're using the wrong function prototype for Cipher#init. IvParameterSpec is an instance of AlgorithmParameterSpec and not AlgorithmParameters, so you need to use the prototype (ILjava/security/Key;Ljava/security/spec/AlgorithmParameterSpec;)V instead.