Android Question [Solved] Layout problem

makis_best

Well-Known Member
Licensed User
Longtime User
Hello

I try to compile my application and I get the error on log file saying
B4X:
Logger connected to:  samsung SM-N976N
--------- beginning of main
Copying updated assets files (2)
*** Service (starter) Create ***
** Service (starter) Start **
** Activity (main) Create (first time) **
Error occurred on line: 23 (B4XMainPage)
java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.keywords.Common.CallSubDebug2(Common.java:1087)
    at com.terrabytez.up.b4xpagesmanager._createpageifneeded(b4xpagesmanager.java:1068)
    at com.terrabytez.up.b4xpagesmanager._showpage(b4xpagesmanager.java:425)
    at com.terrabytez.up.b4xpagesmanager._addpage(b4xpagesmanager.java:245)
    at com.terrabytez.up.b4xpagesmanager._addpageandcreate(b4xpagesmanager.java:259)
    at com.terrabytez.up.b4xpagesmanager._initialize(b4xpagesmanager.java:165)
    at com.terrabytez.up.main._activity_create(main.java:415)
    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:157)
    at com.terrabytez.up.main.afterFirstLayout(main.java:105)
    at com.terrabytez.up.main.access$000(main.java:17)
    at com.terrabytez.up.main$WaitForLayout.run(main.java:83)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6825)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:860)
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:336)
    at anywheresoftware.b4a.debug.Debug.CallSubNew2(Debug.java:285)
    ... 24 more
Caused by: java.lang.reflect.InvocationTargetException
    at java.lang.reflect.Method.invoke(Native Method)
    at anywheresoftware.b4a.debug.Debug.CallSub4(Debug.java:318)
    ... 25 more
Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException

What can be the problem?
The error come out when application trying to load the layout.
 

DonManfred

Expert
Licensed User
Longtime User
Upvote 0

DonManfred

Expert
Licensed User
Longtime User
here is a small project
You DID NOT ADDED the additional resources!
B4X:
#AdditionalRes: ..\Resource

Add them (INCL the folder from the example)

Your project works fine here after adding them....
 
Upvote 0
Top