When an application stops there must be an error message in the logs.
In this example, you can even see that I do not use the library SHA512 v1.01 but only it is included in the list. When I remove the SHa512 library from the list. The compilation and execution of the test is correct.
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Try
Private SQLcipher As SQLCipher
#Region *** Reads the SQL2 data base ***
' Reads the SQL2 data base
SQLcipher.Initialize(File.DirDefaultExternal, "db_testing.db", True, "1234567890", File.DirAssets)
#End Region
If SQLcipher.IsInitialized Then
ToastMessageShow("IsInitialized",True)
SQLcipher.Close
End If
Catch
Log(LastException.Message)
If SQLcipher.IsInitialized Then SQLcipher.Close
End Try
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
LogCat connected to:
--------- beginning of /dev/log/main--------- beginning of /dev/log/system~i:** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
main_activity_create (java line: 325)
java.lang.UnsatisfiedLinkError:
Couldn't load sqlcipher from loader dalvik.system.PathClassLoader[dexPath=/data/app/b4a.example-1.apk,libraryPath=/data/app-lib/b4a.example-1]: findLibrary returned null
at java.lang.Runtime.loadLibrary(Runtime.java:355)
at java.lang.System.loadLibrary(System.java:525)
at net.sqlcipher.database.SQLiteDatabase$1.loadLibraries(SQLiteDatabase.java:213)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:230)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:209)
at net.sqlcipher.database.SQLiteDatabase.loadLibs(SQLiteDatabase.java:202)
at anyhwheresoftware.b4a.objects.sqlcipher.SQLCipher.Initialize(SQLCipher.java:51)
at b4a.example.main._activity_create(main.java:325)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:187)
at b4a.example.main.afterFirstLayout(main.java:102)
at b4a.example.main.access$000(main.java:17)
at b4a.example.main$WaitForLayout.run(main.java:80)
at android.os.Handler.handleCallback(Handler.java:730)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:176)
at android.app.ActivityThread.main(ActivityThread.java:5419)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:525)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862)
at dalvik.system.NativeStart.main(Native Method)