Bug? NoClassDefFoundError httpjob

Ericsko

New Member
Hi, I like this tool, very much, but as I am evaluating it, I found this strange error, and I could not find any solution yet.
I am using the httputils2 library, according to tutorial, created this method:

B4X:
Dim job1 As HttpJob
  job1.Initialize("Job1", Me)
  job1.PostString("http://url/", JSONPackage)
End Sub

Sub JobDone (Job As HttpJob)
  Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
  If Job.Success = True Then
      Select Job.JobName
        Case "Job1"
            'print the result to the logs
            Log(Job.GetString)
      End Select
  Else
      Log("Error: " & Job.ErrorMessage)
      ToastMessageShow("Error: " & Job.ErrorMessage, True)
  End If
  Job.Release
End Sub

Even if I have included the httputils2 library, I am still getting this:

B4X:
synchronizeonCreate (B4A line: 52)
End Sub
java.lang.NoClassDefFoundError: anywheresoftware/b4a/samples/httputils2/httpjob
    at java.lang.Class.getDeclaredMethods(Native Method)
    at java.lang.Class.getDeclaredMethods(Class.java:703)
    at anywheresoftware.b4a.BA.loadHtSubs(BA.java:409)
    at sk.trisoft.idoitlater.synchronize.onCreate(synchronize.java:35)
    at android.app.ActivityThread.handleCreateService(ActivityThread.java:2396)
    at android.app.ActivityThread.access$1700(ActivityThread.java:134)
    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1306)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:4867)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:511)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1007)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:774)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: anywheresoftware.b4a.samples.httputils2.httpjob
    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
    ... 15 more
 

DonManfred

Expert
Licensed User
Longtime User
can you upload your project? Export as zip
snap0035.png


and upload it here.
 
Top