Android Question App crashes wrapper issue??

tsteward

Well-Known Member
Licensed User
Longtime User
I was working my app and it now crashes. I changed the code back to how it was but keep getting this error when trying to load layout.

Line 108 is : Activity.LoadLayout("KeyHSV")

Error occurred on line: 108 (KeyView)
java.lang.RuntimeException: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ImageViewWrapper, to: class anywheresoftware.b4a.objects.ButtonWrapper
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:170)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at lishi.assistand.tony.stewardgmail.com.keyview._activity_create(keyview.java:495)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:732)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:351)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:255)
at java.lang.reflect.Method.invoke(Native Method)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:144)
at lishi.assistand.tony.stewardgmail.com.keyview.afterFirstLayout(keyview.java:104)
at lishi.assistand.tony.stewardgmail.com.keyview.access$000(keyview.java:17)
at lishi.assistand.tony.stewardgmail.com.keyview$WaitForLayout.run(keyview.java:82)
at android.os.Handler.handleCallback(Handler.java:907)
at android.os.Handler.dispatchMessage(Handler.java:105)
at android.os.Looper.loop(Looper.java:216)
at android.app.ActivityThread.main(ActivityThread.java:7625)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:524)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:987)
Caused by: java.lang.RuntimeException: Cannot convert: class anywheresoftware.b4a.objects.ImageViewWrapper, to: class anywheresoftware.b4a.objects.ButtonWrapper
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:409)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayoutHelper(LayoutBuilder.java:453)
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:148)
... 18 more
** Activity (keyview) Resume **
 

Computersmith64

Well-Known Member
Licensed User
Longtime User
A bit obvious (& probably wrong) but have you possibly declared a view with the wrong type? Eg: Do you have a button in the layout that you have declared as an ImageView in your code (or vis-a-vis)?

- Colin.
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
I have not changed anything to do with views or layouts. I was just changing some sql coding and now I have this issues.
I have even gone back and restored an autobackup from two weeks ago and it has the same error.

I don't understand how this can be.
 
Upvote 0

tsteward

Well-Known Member
Licensed User
Longtime User
I would but I don't see the point. I have reverted to two week old version of my app that was working fine and now is not......
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
I would but I don't see the point. I have reverted to two week old version of my app that was working fine and now is not......
Ok - well if you search the forum there are a couple of similar threads (at least one of which was resolved), so you might be able to figure it out from those.

- Colin.
 
Upvote 0
Top