I have tried to use the library
https://www.b4x.com/android/forum/threads/messagepack-library.88295/ by
@victormedranop but cannot make it to work..
I have tried the simple code:
Dim JSONStr As String, bb() As Byte, msgp As msgPacker
JSONStr = "{" & Chr(34) & "test" & Chr(34) & ":123}"
bb= msgp.Serialize2(JSONStr) ' bb= msgp.Serialize(JSONStr) both serialize2 and serialize fail
but both Serialize and Serialize2 methods fail throwing the below error. it almost look like the lib is missing something..I have copied both the "msgPacker.jar" and "msgPacker.xml" files in the "Additional Libraries" folder and the library shows up apparently correctly in the Libraries Manager.
any idea?
java.lang.NoClassDefFoundError: Failed resolution of: Lorg/msgpack/MessagePack;
at msgPacker.msgPacker.Serialize2(msgPacker.java:416)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:348)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:197)
at anywheresoftware.b4a.BA.raiseEvent(BA.java:193)
at anywheresoftware.b4a.objects.ViewWrapper$1.onClick(ViewWrapper.java:80)
at android.view.View.performClick(View.java:6597)
at android.view.View.performClickInternal(View.java:6574)
at android.view.View.access$3100(View.java:778)
at android.view.View$PerformClick.run(View.java:25885)
at android.os.Handler.handleCallback(Handler.java:873)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6669)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.ClassNotFoundException: Didn't find class "org.msgpack.MessagePack" on path: DexPathList[[zip file "/data/app/b4a.example-3RqRGUJmktXM9cq1g-yXQg==/base.apk"],nativeLibraryDirectories=[/data/app/b4a.example-3RqRGUJmktXM9cq1g-yXQg==/lib/x86_64, /system/lib64]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:134)
at java.lang.ClassLoader.loadClass(ClassLoader.java:379)
at java.lang.ClassLoader.loadClass(ClassLoader.java:312)
... 21 more