Android Google Maps第2版未显示 [英] Android Google Maps Version 2 Not Displaying

查看:78
本文介绍了Android Google Maps第2版未显示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道有关该主题的帖子很多,但我感到困惑.我有(2)台用于测试我的App的不同手机. Google Map(支持地图片段)在每台设备上都可以正常显示,但是仅当我直接从Eclipse(使用电缆)将每台设备作为目标时才可以.如果我创建了一个APK文件(通过通过Eclipse导出)并以这种方式在设备上安装了APK文件,则该应用程序可以正常运行,但不会显示地图(仅显示缩放按钮).这是LogCat:

I know there have been a ton of posts on this topic, but I am puzzled. I have (2) different phones that I am testing my App on. The Google Map (Support Map Fragment) displays fine on each device, but only when I target each device directly from Eclipse (using the cable). If I create an APK file (via Exporting through Eclipse) and install the APK file that way on the device, the app runs fine, but the maps don't display (only zoom buttons appear). Here is the LogCat:

03-11 18:02:02.710: W/dalvikvm(31316): Unable to resolve superclass of Lmaps/p/s; (427)
03-11 18:02:02.710: W/dalvikvm(31316): Link of class 'Lmaps/p/s;' failed
03-11 18:02:02.710: W/dalvikvm(31316): Unable to resolve superclass of Lmaps/y/bo; (3820)
03-11 18:02:02.710: W/dalvikvm(31316): Link of class 'Lmaps/y/bo;' failed
03-11 18:02:02.710: W/dalvikvm(31316): Unable to resolve superclass of Lmaps/i/k; (4208)
03-11 18:02:02.710: W/dalvikvm(31316): Link of class 'Lmaps/i/k;' failed
03-11 18:02:02.710: E/dalvikvm(31316): Could not find class 'maps.i.k', referenced from method maps.z.ag.a
03-11 18:02:02.710: W/dalvikvm(31316): VFY: unable to resolve new-instance 3540 (Lmaps/i/k;) in Lmaps/z/ag;

我使用了调试键,因为我现在只是在测试.显然,每个电话都已正确设置(Google Play服务等),这使我相信我没有从Eclipse正确导出APK文件.帮忙!

I used the debug key, as I am just testing for now. Obviously each phone is set up correctly (Google Play Services etc.), which leads me to believe I am not exporting the APK file properly from Eclipse. Help!!

推荐答案

找到了解决方案.导出APK文件时,我没有正确签名应用程序.必须使用调试密钥库-通常位于用户文件夹中的".android"文件夹中.密码是"android".如果正确输入所有内容,则应该能够从别名"中选择"androiddebugkey".密码也是"android".

Found the solution. I was not signing the app properly when exporting the APK file. The debug keystore must be used - usually located in the ".android" folder in your user folder. The password is "android". If you enter everything correctly, you should be able to select the "androiddebugkey" from the "Alias". The password for that is also "android".

当然,当您直接从eclipse将应用程序下载到手机(通过电缆)并对其进行测试时,该应用程序会在调试模式下自动签名",这就是它在这种情况下起作用的原因.

Of course when you download the app directly from eclipse to your phone (via the cable) and test it, the app is automatically 'signed' in debug mode, that is why it worked in that scenario.

这篇关于Android Google Maps第2版未显示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆