tôi có những dòng này trong mã của tôi:'của router ném bởi finalizer' khi mở MapActivity
// create tab4
intent = new Intent(this, ActWhereAmI.class)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
tabspecWhereAmI = tabHost
.newTabSpec("tab4")
.setIndicator(Utilities.prepareTabView(this,"where am I"))
.setContent(intent);
tabHost.addTab(tabspecWhereAmI);
public static View prepareTabView(Context context, String text) {
View view = LayoutInflater.from(context).inflate(
R.layout.tab_indicator, null);
TextView tv = (TextView) view.findViewById(R.id.tabIndicatorTextView);
tv.setText(text);
return view;
}
Khi ứng dụng chạy dòng tabHost.addTab(tabspecWhereAmI);
tôi nhận được lỗi sau chỉ trong LogCat và chương trình chạy mà không có bất kỳ vấn đề :
10-17 13:38:01.164: W/MapActivity(4815): Recycling dispatcher android_maps_conflict_a[email protected]413c8658
10-17 13:38:01.171: V/MapActivity(4815): Recycling map object.
10-17 13:38:01.335: W/MapActivity(4815): Recycling dispatcher android_maps_conflict_a[email protected]413c8658
10-17 13:38:01.335: V/MapActivity(4815): Recycling map object.
10-17 13:38:01.554: D/dalvikvm(4815): GC_CONCURRENT freed 776K, 23% free 10286K/13255K, paused 2ms+7ms
10-17 13:38:01.554: E/System(4815): Uncaught exception thrown by finalizer
10-17 13:38:01.554: E/System(4815): java.lang.IllegalStateException: Binder has been finalized!
10-17 13:38:01.554: E/System(4815): at android.os.BinderProxy.transact(Native Method)
10-17 13:38:01.554: E/System(4815): at android.database.BulkCursorProxy.close(BulkCursorNative.java:288)
10-17 13:38:01.554: E/System(4815): at android.database.BulkCursorToCursorAdaptor.close(BulkCursorToCursorAdaptor.java:133)
10-17 13:38:01.554: E/System(4815): at android.database.CursorWrapper.close(CursorWrapper.java:49)
10-17 13:38:01.554: E/System(4815): at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1591)
10-17 13:38:01.554: E/System(4815): at android.content.ContentResolver$CursorWrapperInner.finalize(ContentResolver.java:1604)
10-17 13:38:01.554: E/System(4815): at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
10-17 13:38:01.554: E/System(4815): at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
10-17 13:38:01.554: E/System(4815): at java.lang.Thread.run(Thread.java:856)
10-17 13:38:01.554: E/System(4815): Uncaught exception thrown by finalizer
10-17 13:38:01.554: E/System(4815): java.lang.IllegalStateException: Binder has been finalized!
10-17 13:38:01.554: E/System(4815): at android.os.BinderProxy.transact(Native Method)
10-17 13:38:01.554: E/System(4815): at android.database.BulkCursorProxy.close(BulkCursorNative.java:288)
10-17 13:38:01.554: E/System(4815): at android.database.BulkCursorToCursorAdaptor.close(BulkCursorToCursorAdaptor.java:133)
10-17 13:38:01.554: E/System(4815): at android.database.CursorWrapper.close(CursorWrapper.java:49)
10-17 13:38:01.554: E/System(4815): at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1591)
10-17 13:38:01.554: E/System(4815): at android.content.ContentResolver$CursorWrapperInner.finalize(ContentResolver.java:1604)
10-17 13:38:01.554: E/System(4815): at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
10-17 13:38:01.554: E/System(4815): at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
10-17 13:38:01.554: E/System(4815): at java.lang.Thread.run(Thread.java:856)
Ngoại lệ này xảy ra trước onCreate(...)
phương thức ActWhereAmI
. Vấn đề của tôi tương tự như câu hỏi này: Uncaught exception thrown by finalizer
Tại sao tôi nhận được lỗi này và cách tôi có thể giải quyết vấn đề này?
Cơ thể của phương thức 'Utilities.prepareTabView()' là gì? – krtek
hoạt động của bạn có phải là MapActivity không? có thể nó liên quan đến MapActivity mà bạn đang sử dụng không liên quan đến mã bạn đã đăng – nandeesh
@nandeesh yesy nó là một MapActivity. – breceivemail