storageservice.create()总是返回空
我正在使用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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不确定您正在使用哪种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