will be helpful for those in need Do not Change package name in StrongsWan package classes. Import the Strongswan project as a module in your application. Compile the Strongswan module as a library, then you can use features of the Strongswan project.
I wish did fix the issue. The Abort message is relatively clear: you call GetFieldID(cls, fieldName) for a field name that does not exist in the class you pass to this function, but you don't check for that error, and continue to call other JNI functions. Unfortunately, you cannot ignore such errors. You must call ExceptionClear() before calling GetMethodID() or most of the JNI functions. You can use addr2line to find which specific call to getMethodID() crashed, and based on this, derive which call to GetFieldID(cls, fieldName) failed. But I would advise to add error checking to all your JNI calls, because tomorrow some other function may throw an exception.
JNI DETECTED ERROR IN APPLICATION: JNI FindClass called with pending exception java.lang.NoSuchMethodError: no non-stati
Hope that helps The typical difference between debug and release builds is that the latter turns on ProGuard obfuscation. This means that names of many classes and methods are automatically changed. Probably, this is what happened to the class example.motion.MotionDetectionReturnValue. The easy fix is to keep the names of classes and methods that are involved in JNI, without obfuscation. See https://stackoverflow.com/a/24923279/192373. More advanced techniques allow to protect these classes, too
JNI NewStringUTF called with pending exception 'java.lang.NoSuchMethodError'