Android Question Java.Lang.Exception error

Baris Karadeniz

Active Member
Licensed User
When I try to open webview I receive an error log below. How can I solve this?

** Activity (main) Create, isFirst = true **
** Activity (main) Resume **
** Activity (main) Resume **
** Activity (main) Pause, UserClosed = false **
** Activity (main) Resume **
true
An error occurred:
(Line: 0) null
java.lang.Exception: Sub webviewmap_pagefinished signature does not match expected signature.
public static anywheresoftware.b4a.pc.RemoteObject app.taksim.driver.main_subs_0._webviewmap_pagefinished() throws java.lang.Exception


My codes are;

B4X:
Sub BtnMap_Click
    PanelMain.Visible = False
    PanelMap.Visible = True
    If UrlLoaded = False Then
    WebViewMap.LoadUrl("http://www.taksi-m.com.tr/track")
    UrlLoaded = True
    Log(UrlLoaded)
    End If
End Sub

Sub WebViewMap_PageFinished
       UrlLoaded = True
    Log(UrlLoaded)
End Sub
 

Baris Karadeniz

Active Member
Licensed User
In my B4i project I wrote the code as below and it works. There is no error;

B4X:
ub WebView3_PageFinished
       UrlLoaded = True
End Sub

But in B4A project it gave error and I corrected as below. It works now.

B4X:
Sub WebViewMap_PageFinished (Url As String)
      UrlLoaded = True
    Log(UrlLoaded)
End Sub

As I see they are not same in B4A and B4i.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…