3

这是我的地图活动类。在此应用程序中,mylocation 在 Google Nexus 手机上完美运行,但在 Galaxy Tab P3100 中无法运行。我在运行应用程序之前检查了wifi 连接。我启用了 1.使用 gps 卫星,2。位置和谷歌3.使用无线网络

公共类 MyMap 扩展 MapActivity {

private MapController mapController;
private MyLocationOverlay myLocation;

/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
    super.onCreate(savedInstanceState);
    setContentView(R.layout.main);

    MapView mapView = (MapView) findViewById(R.id.map_view);
    mapController = mapView.getController();



    mapController.setZoom(6);
    mapView.setBuiltInZoomControls(true);

    myLocation = new MyLocationOverlay(this, mapView);
    mapView.getOverlays().add(myLocation);

    myLocation.enableMyLocation();

    myLocation.runOnFirstFix(new Runnable() {
        public void run() {
            mapController.animateTo(myLocation.getMyLocation());
        }
    });
}

@Override
protected void onResume() {
    super.onResume();
    myLocation.enableMyLocation();
}

@Override
protected void onPause() {
    super.onPause();
    myLocation.disableMyLocation();
}

@Override
protected boolean isRouteDisplayed() {
    // TODO Auto-generated method stub
    return false;
}
 }

它返回

 Uncaught exception thrown by finalizer
 java.lang.IllegalStateException: Binder has been finalized!
 at android.os.BinderProxy.transact(Native Method)
 at android.database.BulkCursorProxy.close(BulkCursorNative.java:288)
 at android.database.BulkCursorToCursorAdaptor.close(BulkCursorToCursorAdaptor.java:133)
at android.database.CursorWrapper.close(CursorWrapper.java:49)
at android.content.ContentResolver$CursorWrapperInner.close(ContentResolver.java:1591)
    at android.content.ContentResolver$CursorWrapperInner.finalize(ContentResolver.java:1604)
at java.lang.Daemons$FinalizerDaemon.doFinalize(Daemons.java:182)
at java.lang.Daemons$FinalizerDaemon.run(Daemons.java:168)
at java.lang.Thread.run(Thread.java:856)

请给我一个解决方案..

谢谢。

4

0 回答 0