Android Question AsyncStreamsObject error

davelew1s

Active Member
Licensed User
Longtime User
Hi! I am using modified version of Erel's 'AsyncStreamsObject example' i enclose a simple app to show the error. If I use the gm activity as a single activity it works ok but when I add it as a second activity (By copy and paste) I get this error message:-
** Service (starter) Create **
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (gm) Create, isFirst = true **
** Activity (gm) Resume **
Class not found: b4j.example.main$_person, trying: b4a.example.main$_person
Error occurred on line: 111 (AsyncStreamsObject)
java.lang.ClassNotFoundException: b4a.example.main$_person
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:217)
at java.lang.Class.forName(Class.java:172)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.readTypeClass(RandomAccessFile.java:562)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.readType(RandomAccessFile.java:570)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.readObject(RandomAccessFile.java:508)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.readHelper(RandomAccessFile.java:434)
at anywheresoftware.b4a.randomaccessfile.RandomAccessFile.ReadObject(RandomAccessFile.java:395)
at b4a.example.asyncstreamsobject._astream_newstream(asyncstreamsobject.java:293)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:668)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:337)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:244)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:132)
at anywheresoftware.b4a.BA$3.run(BA.java:334)
at android.os.Handler.handleCallback(Handler.java:615)
at android.os.Handler.dispatchMessage(Handler.java:92)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4895)
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:994)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NoClassDefFoundError: b4a/example/main$_person
... 27 more
Caused by: java.lang.ClassNotFoundException: b4a.example.main$_person
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
... 27 more

any help would be appreciated Thanks Dave.
 

Attachments

  • test.zip
    11.8 KB · Views: 182
Top