gpt4 book ai didi

android - android 应用程序开头的 java.io.FileNotFoundException : com/google/inject/internal/util/$Finalizer. 类

转载 作者:可可西里 更新时间:2023-11-01 18:46:05 26 4
gpt4 key购买 nike

我正在开发安卓倒计时应用。

在应用程序中,您可以根据需要添加或删除任意数量的倒计时。

所有倒计时都保存在一个 ArrayList 中。我不能只将它们保存在数据库或共享首选项中,因为即使您离开应用程序,倒计时也必须继续运行。

我正在使用 roboguice 2.0 和 guice-3.0-no_aop.jar 来处理我的依赖项注入(inject)。

大多数时候一切正常,但有时如果我启动应用程序,我只会收到以下警告,并且所有变量(如我保存倒计时的 Arraylist)再次为空。

05-21 13:07:33.260: W/nalizableReferenceQueue(14417): Could not load Finalizer in its own class loader. Loading Finalizer in the current class loader instead. As a result, you will not be able to garbage collect this class loader. To support reclaiming this class loader, either resolve the underlying issue, or move Google Collections to your system class path.
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): java.io.FileNotFoundException: com/google/inject/internal/util/$Finalizer.class
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$FinalizableReferenceQueue$DecoupledLoader.getBaseUrl(FinalizableReferenceQueue.java:269)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$FinalizableReferenceQueue$DecoupledLoader.loadFinalizer(FinalizableReferenceQueue.java:253)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$FinalizableReferenceQueue.loadFinalizer(FinalizableReferenceQueue.java:175)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$FinalizableReferenceQueue.<clinit>(FinalizableReferenceQueue.java:100)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$MapMaker$QueueHolder.<clinit>(MapMaker.java:787)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$MapMaker$WeakEntry.<init>(MapMaker.java:946)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$MapMaker$Strength$1.newEntry(MapMaker.java:312)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$MapMaker$StrategyImpl.newEntry(MapMaker.java:498)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$MapMaker$StrategyImpl.newEntry(MapMaker.java:419)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.util.$CustomConcurrentHashMap$ComputingImpl.get(CustomConcurrentHashMap.java:2029)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.Annotations$AnnotationChecker.hasAnnotations(Annotations.java:116)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.Annotations.isBindingAnnotation(Annotations.java:180)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.Key.ensureIsBindingAnnotation(Key.java:366)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.Key.strategyFor(Key.java:338)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.Key.get(Key.java:272)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.AbstractBindingBuilder.annotatedWithInternal(AbstractBindingBuilder.java:82)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.internal.ConstantBindingBuilderImpl.annotatedWith(ConstantBindingBuilderImpl.java:49)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at roboguice.config.DefaultRoboModule.configure(DefaultRoboModule.java:121)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.AbstractModule.configure(AbstractModule.java:59)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.spi.Elements$RecordingBinder.install(Elements.java:223)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.spi.Elements.getElements(Elements.java:101)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.google.inject.spi.Elements.getElements(Elements.java:78)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at roboguice.RoboGuice.setBaseApplicationInjector(RoboGuice.java:81)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at roboguice.RoboGuice.setBaseApplicationInjector(RoboGuice.java:137)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at roboguice.RoboGuice.getBaseApplicationInjector(RoboGuice.java:57)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at roboguice.RoboGuice.getInjector(RoboGuice.java:147)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at roboguice.activity.RoboFragmentActivity.onCreate(RoboFragmentActivity.java:50)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at de.neosit.grafzahl.MainActivity.onCreate(MainActivity.java:38)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.app.Activity.performCreate(Activity.java:4637)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1051)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1932)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1993)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.app.ActivityThread.access$600(ActivityThread.java:127)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1151)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.os.Handler.dispatchMessage(Handler.java:99)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.os.Looper.loop(Looper.java:137)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at android.app.ActivityThread.main(ActivityThread.java:4499)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at java.lang.reflect.Method.invokeNative(Native Method)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at java.lang.reflect.Method.invoke(Method.java:511)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:788)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:555)
05-21 13:07:33.260: W/nalizableReferenceQueue(14417): at dalvik.system.NativeStart.main(Native Method)

我不知道是什么导致了这个问题。我读到有人遇到了同样的问题,但普遍的看法是这只是一个警告,可以忽略。所以可能是其他原因导致了变量的重置。

我希望你能帮助我。提前致谢。

最佳答案

在 android studio 中,我更改了 build.gradle 依赖项。

dependencies {
...
compile 'com.google.inject:guice:4.0-beta:no_aop'
compile 'org.roboguice:roboguice:2.0'
}

关于android - android 应用程序开头的 java.io.FileNotFoundException : com/google/inject/internal/util/$Finalizer. 类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16718082/

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