Android Question Error occurred, webview??

Suzanne

Member
Licensed User
Longtime User
Hi Guys,

Since updating my basic4andriod Software, i'm receiving the error as pictured below in the attached file. Can anyone shed any light and advice me what the problem is?

Many thanks

Suzanne
 

Attachments

  • error1.jpg
    error1.jpg
    33 KB · Views: 254

Computersmith64

Well-Known Member
Licensed User
Longtime User
Is the view that is generating the error part of a layout that you created in the designer, or is it one that you created in code?

If it's in a designer layout, you might just need to open the layout file & then save it again. There have been some changes to the format of the designer files during some recent updates of B4A, so the format of your layout might not be compatible with your new version of B4A.

If the view is created in code, then it appears that you are trying to reference it before you have initialized it. Double check in your code that the first reference to the view is to initialize it.

- Colin.
 
Upvote 0

Suzanne

Member
Licensed User
Longtime User
Hi Colin,

Thank you for the quick response, i've just tried the above as suggested but now i'm receiving the error2 attached. Is there any chance you could do me a demo web view, URL to ebay so i can test it on mine machine??

Many thanks

Suzanne
 

Attachments

  • error2.jpg
    error2.jpg
    19.3 KB · Views: 222
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
This latest error looks like you might be using an out of date library. Can you post your code & I'll see if I can figure it out.
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Hi Colin,

Thank you for the quick response, i've just tried the above as suggested but now i'm receiving the error2 attached. Is there any chance you could do me a demo web view, URL to ebay so i can test it on mine machine??

Many thanks

Suzanne

This seems to work...
 

Attachments

  • webviewtest.zip
    7 KB · Views: 174
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Thanks for taking a look Colin, i've attached the file.
Works fine for me. I'd say you have an out of date library. Make sure that VBWep & WebViewSettings are up to date. I downloaded v1.1 of vbWep (although it reports as v1.0 in B4A) & v1.31 of WebViewSettings.
 
Upvote 0

Suzanne

Member
Licensed User
Longtime User
Thanks Colin, i have updated both settings as suggested and i have took a screen shot of my library but unfortunating still receiving the error2.
This is the error i'm seeing in red on the right hand side:

at android.webkit.WebView.<init>(WebView.java:434)
at anywheresoftware.b4a.objects.WebViewWrapper.innerInitialize(WebViewWrapper.java:51)
~e: at anywheresoftware.b4a.objects.ViewWrapper.Initialize(ViewWrapper.java:53)


at uk.co.martinpearman.b4a.webviewextras.demo.main._activity_create(main.java:278)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at anywheresoftware.b4a.BA.raiseEvent2(BA.java:174)
at uk.co.martinpearman.b4a.webviewextras.demo.main.afterFirstLayout(main.java:98)
at uk.co.martinpearman.b4a.webviewextras.demo.main.access$100(main.java:16)
at uk.co.martinpearman.b4a.webviewextras.demo.main$WaitForLayout.run(main.java:76)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5042)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:776)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.android.webview.chromium.WebViewChromiumFactoryProvider
at java.lang.Class.classForName(Native Method)
at java.lang.Class.forName(Class.java:251)
at java.lang.Class.forName(Class.java:216)
at android.webkit.WebViewFactory.getFactoryClass(WebViewFactory.java:115)
at android.webkit.WebViewFactory.getProvider(WebViewFactory.java:85)
... 30 more
Caused by: java.lang.NoClassDefFoundError: com/android/webview/chromium/WebViewChromiumFactoryProvider
... 35 more
Caused by: java.lang.ClassNotFoundException: Didn't find class "com.android.webview.chromium.WebViewChromiumFactoryProvider" on path: DexPathList[[directory "."],nativeLibraryDirectories=[/system/lib]]
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
at java.lang.ClassLoader.loadClass(ClassLoader.java:497)
at java.lang.ClassLoader.loadClass(ClassLoader.java:457)
... 35 more
android.util.AndroidRuntimeException: java.lang.ClassNotFoundException: com.android.webview.chromium.WebViewChromiumFactoryProvider‏
 

Attachments

  • lib.jpg
    lib.jpg
    31.3 KB · Views: 196
  • error2.jpg
    error2.jpg
    19.3 KB · Views: 194
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Did that sample I uploaded work for you? When does this crash? Is it during startup of the app, or at some other time? What version of B4A are you using?
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
EDIT: Forget that - I see they are added to the AndroidManifest at compile time...

Oh - I notice that you don't have any of the permissions required for VBWep in your manifest:

B4X:
android.permission.CHANGE_NETWORK_STATE
android.permission.WAKE_LOCK
android.permission.INTERNET
android.permission.UPDATE_DEVICE_STATS
android.permission.CHANGE_WIFI_STATE
android.permission.ACCESS_NETWORK_STATE
android.permission.ACCESS_WIFI_STATE

Try adding these & see if that helps...
 
Last edited:
Upvote 0

Suzanne

Member
Licensed User
Longtime User
i'm using version 3.82, still getting an error even with your sample as seen attached. It crashes on the emulator after debugging.
 

Attachments

  • error4.jpg
    error4.jpg
    198.1 KB · Views: 211
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
Hmmm - I'm not seeing any issues with either your code or mine. Maybe the Android SDK version you are compiling against? Might be one for Erel to chime in on...
 
Upvote 0

Computersmith64

Well-Known Member
Licensed User
Longtime User
You're welcome. Sorry I couldn't resolve your issue. Erel generally scans the forums daily, so I expect he'll see this one & respond.
 
Upvote 0
Top