storageservice.create()总是返回空

发布于 2025-02-01 19:12:44 字数 3504 浏览 2 评论 0原文

我正在使用Intellij Ultimate在Windows 10机器上开发Gluon应用程序。每当我打电话时:

StorageService.create()

我得到一个可选的。在应用程序输出中,我看到:

com.gluonhq.attach.util.impl.DefaultServiceFactory createInstance
WARNING: No new instance for interface com.gluonhq.attach.storage.StorageService and class com.gluonhq.attach.storage.impl.DesktopStorageService
May 26, 2022 8:37:25 PM com.gluonhq.impl.charm.glisten.tracking.TrackingManager <clinit>
SEVERE: null
java.io.IOException: Private storage file not available
    at [email protected]/com.gluonhq.impl.charm.glisten.tracking.TrackingManager.lambda$static$0(TrackingManager.java:28)
    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
    at [email protected]/com.gluonhq.impl.charm.glisten.tracking.TrackingManager.<clinit>(TrackingManager.java:28)
    at [email protected]/com.gluonhq.charm.glisten.application.MobileApplication.continueInit(MobileApplication.java:266)
    at [email protected]/com.gluonhq.charm.glisten.application.MobileApplication.start(MobileApplication.java:232)
    at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
    at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
    at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)

在开发应用程序时,我该怎么做才能使我可以使用私人存储空间?

I'm developing a Gluon application on a Windows 10 machine using IntelliJ Ultimate. Whenever I call:

StorageService.create()

I get an Optional.empty returned to me. In the application output, I see:

com.gluonhq.attach.util.impl.DefaultServiceFactory createInstance
WARNING: No new instance for interface com.gluonhq.attach.storage.StorageService and class com.gluonhq.attach.storage.impl.DesktopStorageService
May 26, 2022 8:37:25 PM com.gluonhq.impl.charm.glisten.tracking.TrackingManager <clinit>
SEVERE: null
java.io.IOException: Private storage file not available
    at [email protected]/com.gluonhq.impl.charm.glisten.tracking.TrackingManager.lambda$static$0(TrackingManager.java:28)
    at java.base/java.util.Optional.orElseThrow(Optional.java:403)
    at [email protected]/com.gluonhq.impl.charm.glisten.tracking.TrackingManager.<clinit>(TrackingManager.java:28)
    at [email protected]/com.gluonhq.charm.glisten.application.MobileApplication.continueInit(MobileApplication.java:266)
    at [email protected]/com.gluonhq.charm.glisten.application.MobileApplication.start(MobileApplication.java:232)
    at [email protected]/com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$9(LauncherImpl.java:847)
    at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runAndWait$12(PlatformImpl.java:484)
    at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:457)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at [email protected]/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:456)
    at [email protected]/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
    at [email protected]/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at [email protected]/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:184)
    at java.base/java.lang.Thread.run(Thread.java:833)

What can I do to make private storage available to me while developing my app?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

微凉 2025-02-08 19:12:44

我不确定您正在使用哪种Maven版本的附件服务存储,但我较早发现了一个已修补的错误。请参阅此链接:
https://stackoverflow.com/a/a/69484071/16394182

I'm not sure which maven version of the attach service Storage you're using but I found a bug earlier that was patched. See this link:
https://stackoverflow.com/a/69484071/16394182

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文