Android Question No such Method :loadLayout

jamesnz

Active Member
Licensed User
Longtime User
B4X:
Sub Activity_Create(FirstTime As Boolean)
    'Do not forget to load the layout file created with the visual designer. For example:
    Activity.LoadLayout("Show") '<==Line 49
    If MapFragment1.IsGooglePlayServicesAvailable = False Then
        ToastMessageShow("Please go to Android Market and install Google Play Services.", True)
    End If

This code worked yesterday but not today
All files appear to be in the right places

Error occurred on line: 49 (Show)
java.lang.RuntimeException: java.lang.NoSuchMethodException: _initialize [class anywheresoftware.b4a.BA, class java.lang.Object, class java.lang.String]
at anywheresoftware.b4a.keywords.LayoutBuilder.loadLayout(LayoutBuilder.java:166)
at anywheresoftware.b4a.objects.ActivityWrapper.LoadLayout(ActivityWrapper.java:209)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.shell.Shell.runMethod(Shell.java:710)
at anywheresoftware.b4a.shell.Shell.raiseEventImpl(Shell.java:342)
at anywheresoftware.b4a.shell.Shell.raiseEvent(Shell.java:249)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at anywheresoftware.b4a.ShellBA.raiseEvent2(ShellBA.java:134)
at com.ideas.qviz.show.afterFirstLayout(show.java:102)
at com.ideas.qviz.show.access$000(show.java:17)
at com.ideas.qviz.show$WaitForLayout.run(show.java:80)
at android.os.Handler.handleCallback(Handler.java:815)
at android.os.Handler.dispatchMessage(Handler.java:104)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5747)
 

DonManfred

Expert
Licensed User
Longtime User
No such Method :loadLayout
as said in the threadtitle is not the same as the error from the log!?
Error occurred on line: 49 (Show)
java.lang.RuntimeException: java.lang.NoSuchMethodException: _initialize [class anywheresoftware.b4a.BA, class java.lang.Object, class java.lang.String]

Can you upload a small project which shows the problem?
 
Upvote 0

jamesnz

Active Member
Licensed User
Longtime User
I think this is environment dependent, possibly maps because a few minutes ago I found it works OK on my laptop-
but not my PC!
However... I OPen the app, press go, select any item off the list picker, it ceases on line 49 of activity called show.

I'm going to reinstall Google Maps and Google Play services and see if this works
 
Upvote 0
Top