I went back to modify an app that ran with no problems in the Companion and produced a working app file. When I ran it in the Companion this time I got a "invoke: no method named `Clear' in class java.lang.Boolean" error. But the compiled app seems to work fine despite the no method Clear warning.
It's a graphic app that draws linear equations of a line segment that the user can drag around the screen to see the y = mx + b equation for the segment.
The second screen "math_trap" is a game where the user must enclose a jumping frog sprite within a triangle of lines. The slope and y intercept for each equation must be entered to form the triangle.
The problem arises when in the Math Trap game, one goes back to Screen1, "Linear Explorer."
I tried the following:
- Deleting and re-installing the Android Companion app.
- Uploading the latest "properly" working version from my computer.
- Messing around with the code.
- Checking with closing and opening screens code. My strategy for going from Screen_1 to math_trap was to just open the math_trap. To go back to Screen1, I close math_trap and the app defaults to Screen1, already still open.
- Searched for similar problems using Google and the App Inventor Community.
I use the canvas clear operation repeatedly.
Explore_Mtrap_2.aia (1.4 MB)
What might cause the error message?
Is there a way to trap the error?
Thanks,
Dan