我的代码现在,在模拟正常运行显示地图,但是安装到手机上后,就不能显示地图了,这是为什么?怎么才能解决?
希望有人可以给我点提示!谢谢

解决方案 »

  1.   

    应该不是,我手机其他软件 可以打开GPRS,可以获取地图,我写的也就是一个直接连接网络获取地图的程序,在模拟器上,就可以看到地图,在手机上就显示白的
      

  2.   

    在模拟上打log,然后再在手机上打log,对比两份log的区别,就能找到问题了。
    否则,光这么说,没法帮助你。
      

  3.   

    模拟器上运行效果:
    I/ActivityManager(59):Startingactivity:Intent{cmp=com.kinview.mgas/.ActivityMain}
    I/ActivityManager(59):Displayedactivitycom.kinview.mgas/.ActivityMain:1170ms(total1170ms)
    I/ActivityManager(59):Startingactivity:Intent{cmp=com.kinview.mgas/.ActivityMap}
    E/ActivityThread(334):Failedtofindproviderinfoforcom.google.settings
    E/ActivityThread(334):Failedtofindproviderinfoforcom.google.settings
    E/ActivityThread(334):Failedtofindproviderinfoforcom.google.settings

    I/MapActivity(334):Handlingnetworkchangenotification:CONNECTED
    E/MapActivity(334):Couldn'tgetconnectionfactoryclient
    D/dalvikvm(334):GCfreed7788objects/378936bytesin227ms
    I/dalvikvm(334):Uncaughtexceptionthrownbyfinalizer(willbediscarded):
    I/dalvikvm(334):Ljava/lang/IllegalStateException;:Finalizingcursorandroid.database.sqlite.SQLiteCursor@43d853c8onloginthathasnotbeendeactivatedorclosed
    I/dalvikvm(334): atandroid.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    I/dalvikvm(334): atdalvik.system.NativeStart.run(NativeMethod)
    D/dalvikvm(334):GCfreed10226objects/617632bytesin209ms
    I/ActivityManager(59):Displayedactivitycom.kinview.mgas/.ActivityMap:2940ms(total2940ms)
    D/dalvikvm(334):GCfreed5505objects/461376bytesin304ms
    D/dalvikvm(334):GCfreed1026objects/92592bytesin178ms
    D/dalvikvm(334):GCfreed3306objects/232096bytesin193ms
    手机上运行效果:I/ActivityManager( 1289): Starting activity: Intent { cmp=com.kinview.mgas/.ActivityMap }
    I/MapActivity( 2010): Handling network change notification:CONNECTED
    E/MapActivity( 2010): Couldn't get connection factory clientD/dalvikvm( 1338): GC freed 2045 objects / 544128 bytes in 97ms
    D/dalvikvm( 2010): GC freed 12057 objects / 617312 bytes in 58ms
    I/dalvikvm( 2010): Uncaught exception thrown by finalizer (will be discarded):
    I/dalvikvm( 2010): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@44ce4480 on login that has not been deactivated or closed
    I/dalvikvm( 2010):  at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    I/dalvikvm( 2010):  at dalvik.system.NativeStart.run(Native Method)
    I/dalvikvm( 2010): Uncaught exception thrown by finalizer (will be discarded):
    I/dalvikvm( 2010): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@44c90660 on login that has not been deactivated or closed
    I/dalvikvm( 2010):  at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    I/dalvikvm( 2010):  at dalvik.system.NativeStart.run(Native Method)
    I/dalvikvm( 2010): Uncaught exception thrown by finalizer (will be discarded):
    I/dalvikvm( 2010): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@44c7d2c0 on login that has not been deactivated or closed
    I/dalvikvm( 2010):  at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    I/dalvikvm( 2010):  at dalvik.system.NativeStart.run(Native Method)
    I/dalvikvm( 2010): Uncaught exception thrown by finalizer (will be discarded):
    I/dalvikvm( 2010): Ljava/lang/IllegalStateException;: Finalizing cursor android.database.sqlite.SQLiteCursor@44c946f8 on login that has not been deactivated or closed
    I/dalvikvm( 2010):  at android.database.sqlite.SQLiteCursor.finalize(SQLiteCursor.java:596)
    I/dalvikvm( 2010):  at dalvik.system.NativeStart.run(Native Method)
    W/ResourceType( 2010): Failure getting entry for 0x01080217 (t=7 e=535) in package 0: 0xffffffb5
    E/MapView ( 2010): IllegalStateException on drawMap. Wiping cache.
    E/MapView ( 2010): java.lang.IllegalStateException: Null Bitmap! "loading_tile"; if seen during a test, this usually means that the image file needs to be added to the test.config file
    E/MapView ( 2010):  at com.google.common.graphics.android.AndroidImage.<init>(Unknown Source)
    E/MapView ( 2010):  at com.google.common.graphics.android.AndroidImageFactory.createImage(Unknown Source)
    E/MapView ( 2010):  at com.google.googlenav.map.MapTile.createTempImages(Unknown Source)
    E/MapView ( 2010):  at com.google.googlenav.map.MapTile.getTempImage(Unknown Source)
    E/MapView ( 2010):  at com.google.googlenav.map.MapTile.getImage(Unknown Source)
    E/MapView ( 2010):  at com.google.googlenav.map.Map.drawTile(Unknown Source)
    E/MapView ( 2010):  at com.google.googlenav.map.Map.drawMapBackground(Unknown Source)
    E/MapView ( 2010):  at com.google.googlenav.map.Map.drawMap(Unknown Source)
    E/MapView ( 2010):  at com.google.android.maps.MapView.drawMap(MapView.java:1048)
    E/MapView ( 2010):  at com.google.android.maps.MapView.onDraw(MapView.java:486)
    E/MapView ( 2010):  at android.view.View.draw(View.java:6535)
    E/MapView ( 2010):  at android.view.ViewGroup.drawChild(ViewGroup.java:1527)
    E/MapView ( 2010):  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1257)
    E/MapView ( 2010):  at android.view.View.draw(View.java:6538)
    E/MapView ( 2010):  at android.view.ViewGroup.drawChild(ViewGroup.java:1527)
    E/MapView ( 2010):  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1257)
    E/MapView ( 2010):  at android.view.View.draw(View.java:6538)
    E/MapView ( 2010):  at android.widget.FrameLayout.draw(FrameLayout.java:352)
    E/MapView ( 2010):  at android.view.ViewGroup.drawChild(ViewGroup.java:1527)
    E/MapView ( 2010):  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1257)
    E/MapView ( 2010):  at android.view.ViewGroup.drawChild(ViewGroup.java:1525)
    E/MapView ( 2010):  at android.view.ViewGroup.dispatchDraw(ViewGroup.java:1257)
    E/MapView ( 2010):  at android.view.View.draw(View.java:6538)
    E/MapView ( 2010):  at android.widget.FrameLayout.draw(FrameLayout.java:352)
    E/MapView ( 2010):  at com.android.internal.policy.impl.PhoneWindow$DecorView.draw(PhoneWindow.java:1830)
    E/MapView ( 2010):  at android.view.ViewRoot.draw(ViewRoot.java:1349)
    E/MapView ( 2010):  at android.view.ViewRoot.performTraversals(ViewRoot.java:1114)
    E/MapView ( 2010):  at android.view.ViewRoot.handleMessage(ViewRoot.java:1633)
    E/MapView ( 2010):  at android.os.Handler.dispatchMessage(Handler.java:99)
    E/MapView ( 2010):  at android.os.Looper.loop(Looper.java:123)
    E/MapView ( 2010):  at android.app.ActivityThread.main(ActivityThread.java:4363)
    E/MapView ( 2010):  at java.lang.reflect.Method.invokeNative(Native Method)
    E/MapView ( 2010):  at java.lang.reflect.Method.invoke(Method.java:521)
    E/MapView ( 2010):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
    E/MapView ( 2010):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
    E/MapView ( 2010):  at dalvik.system.NativeStart.main(Native Method)
    W/ResourceType( 2010): Failure getting entry for 0x01080217 (t=7 e=535) in package 0: 0xffffffb5
      

  4.   

    我也遇到这样的问题,模拟器上可以获取地图,但是在手机上就只能显示一个黄色的方块
    我已经将api key替换成发布用的keystore申请的key了,报的错误和楼主一样,不知道楼主找到解决方法没
      

  5.   

    手机Google map  反应速度慢在怎么办啊?
      

  6.   

    我找到原因了!是我的手机的系统是翻墙版的!所以连不了google的服务器,就打不开地图了!