Android Question Startapp wrapper error

hookshy

Well-Known Member
Licensed User
Longtime User
I have tested the original example found on github and released by start app with latest skd ...every time I copy the code to my apps I got an error on banner integration ...but the example works.

https://github.com/StartApp-SDK/StartApp_InApp_SDK_B4A_Example


error shown:
android.widget.Button cannot be cast to android.widget.RelativeLayout
at com.startapp.android.publish.b4a.banner.BannerWrapper.addBannerWithPositionAndType(BannerWrapper.java:77)
B4X:
Error occurred on line: 448 (main)
java.lang.ClassCastException: android.widget.Button cannot be cast to android.widget.RelativeLayout
    at com.startapp.android.publish.b4a.banner.BannerWrapper.addBannerWithPositionAndType(BannerWrapper.java:77)
    at com.startapp.android.publish.b4a.banner.BannerWrapper.addBannerWithPosition(BannerWrapper.java:70)
    at com.duck.stearing.main._showbanner(main.java:867)
    at com.duck.stearing.main._activity_create(main.java:809)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:636)
    at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:305)
    at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:238)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:121)
    at com.duck.stearing.main.afterFirstLayout(main.java:100)
    at com.duck.stearing.main.access$100(main.java:17)
    at com.duck.stearing.main$WaitForLayout.run(main.java:78)
    at android.os.Handler.handleCallback(Handler.java:730)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:137)
    at android.app.ActivityThread.main(ActivityThread.java:5473)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:525)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:854)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:670)
    at dalvik.system.NativeStart.main(Native Method)
** Activity (main) Resume **
 

hookshy

Well-Known Member
Licensed User
Longtime User
I found out that the layout is causing the problem ...do not have any idea I have wrote to startapp and send them the layout ....
I guess they read something from it that do not match their skd or wraper

I have all my pannels spread over the layout I do not have any idea what is the problem ....we shall wait to see what startapp is saying about this
Thank you
 
Upvote 0
Top