ClassNotFound Exception???

jschuchert

Active Member
Licensed User
Longtime User
I am really stumped by this one although the fix may be right in front of me.
I created a new layout named "angdist" with an activity module by the name of "Angledist". A button to activate the activity is on another layout called "menu" ( with several other buttons). No problem with any of the others. However, when I select the button (AngDist) from the menu, I get the following error message:
"Error has occurred in Sub menu_btnangdist_click startactivity("angdist") Java.lang ClassNotfoundexception android.b4a.androidcogo.angdist"

I verified the buttons have all been dimmed, create activity is ok, the layout file shows in the Files folder, etc. The only difference I can see is that the name of the activity (as shown in the links on the right side of the IDE is AngleDist vs angdist (name of the layout). What have I forgotten? I don't know where else to check for the problem.

B4X:
Sub btnAngDist_click
StartActivity("angdist")  <<<<<<<<< this line throws the error
End Sub

The error message above says it is in the "startactivity" line from the "menu" module.
I will start on another routine while waiting for a reply. I only have 22 more.

Jim Schuchert
 

stevel05

Expert
Licensed User
Longtime User
If your Activity module is called "Angledist" shouldn't it be StartActivity("Angledist") ?

Steve
 
Upvote 0

jschuchert

Active Member
Licensed User
Longtime User
Steve, you are absolutely correct. I feel like an idiot. I am so used to naming the layout the same as the activity, I totally spaced it on this one although I knew there was a difference in names. Thank you so much.

Erel, thanks for the tip. I will begin leaving off the " ".

Jim
 
Upvote 0
Top