gpt4 book ai didi

codenameone - 创建 CEF 浏览器失败

转载 作者:行者123 更新时间:2023-12-04 07:59:58 25 4
gpt4 key购买 nike

我的应用程序无法构建甚至运行。它给我一个创建 CEF 浏览器失败的错误。
直到今天,一切都运行良好。我按照此链接中的说明再次卸载并安装了 CEF:Big Changes and CEF但它仍然给了我错误。
这是控制台中的完整错误:

java.lang.RuntimeException: Failed to create CEF browser
[EDT] 0:0:0,40 - Exception: java.lang.RuntimeException - Failed to create CEF browser
at com.codename1.impl.javase.cef.JavaCEFSEPort.createCEFBrowserComponent(JavaCEFSEPort.java:130)
at com.codename1.impl.javase.cef.JavaCEFSEPort.createBrowserComponent(JavaCEFSEPort.java:98)
at com.codename1.ui.BrowserComponent$9.run(BrowserComponent.java:557)
at com.codename1.ui.Display.processSerialCalls(Display.java:1338)
at com.codename1.ui.Display.edtLoopImpl(Display.java:1280)
at com.codename1.ui.Display.mainEDTLoop(Display.java:1162)
at com.codename1.ui.RunnableWrapper.run(RunnableWrapper.java:120)
at com.codename1.impl.CodenameOneThread.run(CodenameOneThread.java:176)
Caused by: java.lang.UnsatisfiedLinkError: /home/falcon/.codenameone/cef/lib/linux64/libjcef.so: libjawt.so: cannot open shared object file: No such file or directory
at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2442)
at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2498)
at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2694)
at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2640)
at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:830)
at java.base/java.lang.System.loadLibrary(System.java:1873)
at org.cef.SystemBootstrap$1.loadLibrary(SystemBootstrap.java:24)
at org.cef.SystemBootstrap.loadLibrary(SystemBootstrap.java:36)
at org.cef.CefApp.startup(CefApp.java:536)
at com.codename1.impl.javase.cef.CEFBrowserComponent.create(CEFBrowserComponent.java:207)
at com.codename1.impl.javase.cef.CEFBrowserComponent.create(CEFBrowserComponent.java:199)
at com.codename1.impl.javase.cef.CEFBrowserComponent.create(CEFBrowserComponent.java:196)
at com.codename1.impl.javase.cef.JavaCEFSEPort.createCEFBrowserComponent(JavaCEFSEPort.java:136)
at com.codename1.impl.javase.cef.JavaCEFSEPort$2.run(JavaCEFSEPort.java:120)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:303)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
java.lang.RuntimeException: Failed to create screenshots for HTML <!doctype html> ...(CSS file contents)
</html>. Timeout reached. Likely there was a problem initializing the browser component.
at com.codename1.designer.css.ResourcesMutator.createScreenshots(ResourcesMutator.java:668)
at com.codename1.designer.css.CSSTheme.createImageBorders(CSSTheme.java:2562)
at com.codename1.designer.css.CN1CSSCLI.compile(CN1CSSCLI.java:916)
at com.codename1.designer.css.CN1CSSCLI.main(CN1CSSCLI.java:780)
at com.codename1.designer.ResourceEditorApp._main(ResourceEditorApp.java:568)
at com.codename1.designer.ResourceEditorApp.main(ResourceEditorApp.java:258)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at com.codename1.impl.javase.CN1Bootstrap.run(CN1Bootstrap.java:218)
at com.codename1.impl.javase.CN1Bootstrap.run(CN1Bootstrap.java:96)
at com.codename1.designer.ResourceEditorApp.main(ResourceEditorApp.java:265)
/home/falcon/NetBeansProjects/bizapp_mobile/build.xml:625: Java returned: 1
BUILD FAILED (total time: 1 minute 2 seconds)
可能是什么问题呢?

最佳答案

这是一个 known issue现在使用 Linux。

UnsatisfiedLinkException (libjcef.so: libjawt.so)On Ubuntu 20, and some other versions of Linux, it has been reported that, when running the Codename One simulator with CEF installed, you get UnsatisfiedLinkException mentioning that libjcef.so could not find libjawt.so. This is caused because the lib directory of the JDK is not in the LD_LIBRARY_PATH. You an work around this problem by adding it. E.g.

export LD_LIBRARY_PATH=$JAVA_HOME/lib/amd64

关于codenameone - 创建 CEF 浏览器失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66526364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com