Android Question Strange ClassNotFoundException

Arf

Well-Known Member
Licensed User
Longtime User
I can't seem to resolve an issue I'm having.
I changed the Bluetooth Chat tutorial project to suit my needs, all was working well.
I got rid of the BluetoothManager class file, and shifted all the functionality from there into the Starter Service, in an experiment of sorts to see if the behaviour was the same (Iam getting slightly different behaviour in my modified project than I do in my old reliable project, which runs the bluetooth code from a Service).

Anyhow, I get this error at runtime:
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create, isFirst = true **
Error occurred on line: 38 (Main)
java.lang.RuntimeException: java.lang.ClassNotFoundException: anywheresoftware.b4a.samples.bluetooth.bluetoothmanager$_nameandmac
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:297)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:357)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:112)
at ...blah blah blah


I don't understand why there is a 'bluetoothmanager$_nameandmac mentioned. I deleted the BluetoothManager file from the project, and cleaned the project before compiling.
The NameAndMac type defition is now in a code module called 'Types'.

Any ideas as to what I am doing wrong?
Thanks
 

Arf

Well-Known Member
Licensed User
Longtime User
No, a 'Find all references' finds no record of 'BluetoothManager' anywhere.
 
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
java.lang.RuntimeException: java.lang.ClassNotFoundException: anywheresoftware.b4a.samples.bluetooth.bluetoothmanager$_nameandmac
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readType(B4XSerializator.java:297)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.readObject(B4XSerializator.java:357)
at anywheresoftware.b4a.randomaccessfile.B4XSerializator.ReadObject(B4XSerializator.java:112)
you are reading a serialized object back?
At time you wrote the serialized object the bluetoothmanager was in your project?
 
  • Like
Reactions: Arf
Upvote 0
Top