在我的应用程序中,我的日志中不断收到此警告:
12-17 20:17:20.979: W/CursorWrapperInner(3715): Cursor finalized without prior close().
使用时:
StrictMode.setVmPolicy(new StrictMode.VmPolicy.Builder()
.detectAll()
.penaltyLog()
.penaltyDeath()
.build());
我得到:
12-17 20:19:55.049: E/StrictMode(3919): A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
12-17 20:19:55.049: E/StrictMode(3919): java.lang.Throwable: Explicit termination method 'close' not called
12-17 20:19:55.049: E/StrictMode(3919): at dalvik.system.CloseGuard.open(CloseGuard.java:184)
12-17 20:19:55.049: E/StrictMode(3919): at android.content.ContentResolver$CursorWrapperInner.<init>(ContentResolver.java:1582)
12-17 20:19:55.049: E/StrictMode(3919): at android.content.ContentResolver.query(ContentResolver.java:321)
12-17 20:19:55.049: E/StrictMode(3919): at android_maps_conflict_avoidance.com.google.common.android.AndroidConfig.getSetting(AndroidConfig.java:216)
12-17 20:19:55.049: E/StrictMode(3919): at android_maps_conflict_avoidance.com.google.common.android.AndroidConfig.getDistributionChannelInternal(AndroidConfig.java:195)
12-17 20:19:55.049: E/StrictMode(3919): at android_maps_conflict_avoidance.com.google.common.Config.init(Config.java:273)
12-17 20:19:55.049: E/StrictMode(3919): at android_maps_conflict_avoidance.com.google.common.android.AndroidConfig.<init>(AndroidConfig.java:100)
12-17 20:19:55.049: E/StrictMode(3919): at android_maps_conflict_avoidance.com.google.common.android.AndroidConfig.<init>(AndroidConfig.java:87)
12-17 20:19:55.049: E/StrictMode(3919): at com.google.android.maps.MapActivity.onCreate(MapActivity.java:419)
12-17 20:19:55.049: E/StrictMode(3919): at com.WhosAround.Activities.BaseActivity.onCreate(BaseActivity.java:36)
12-17 20:19:55.049: E/StrictMode(3919): at com.WhosAround.Activities.Loader.onCreate(Loader.java:64)
12-17 20:19:55.049: E/StrictMode(3919): at android.app.Activity.performCreate(Activity.java:4465)
12-17 20:19:55.049: E/StrictMode(3919): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1049)
12-17 20:19:55.049: E/StrictMode(3919): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)
12-17 20:19:55.049: E/StrictMode(3919): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981)
12-17 20:19:55.049: E/StrictMode(3919): at android.app.ActivityThread.access$600(ActivityThread.java:123)
12-17 20:19:55.049: E/StrictMode(3919): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)
12-17 20:19:55.049: E/StrictMode(3919): at android.os.Handler.dispatchMessage(Handler.java:99)
12-17 20:19:55.049: E/StrictMode(3919): at android.os.Looper.loop(Looper.java:137)
12-17 20:19:55.049: E/StrictMode(3919): at android.app.ActivityThread.main(ActivityThread.java:4424)
12-17 20:19:55.049: E/StrictMode(3919): at java.lang.reflect.Method.invokeNative(Native Method)
12-17 20:19:55.049: E/StrictMode(3919): at java.lang.reflect.Method.invoke(Method.java:511)
12-17 20:19:55.049: E/StrictMode(3919): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
12-17 20:19:55.049: E/StrictMode(3919): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
12-17 20:19:55.049: E/StrictMode(3919): at dalvik.system.NativeStart.main(Native Method)
应用程序实际上崩溃了......我如何调试这个警告来自哪里?我没有使用任何我知道的光标...