空白屏幕Android 2.2的谷歌地图V2 [英] Blank Screen Android 2.2 Google Maps v2

查看:183
本文介绍了空白屏幕Android 2.2的谷歌地图V2的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:

我调到了我20+项目试图使用谷歌地图Android版V2。变换钥匙之类的东西之后,现在,它的工作原理。我不知道是什么让这项工作,但谢谢大家。我得到了一个密钥库,关键是正确的。我想这不知何故神奇地固定。好了,感谢球员。

我做2天的搜索,我不能修复此问题。我所做的一切,然而,这个应用程序无法正常工作。

我想我的应用程序在Android 2.2及以上工作。像它说:如果你在8级创建的应用程序,它会支持市场的95%。

下面是我的截图和源$ C ​​$ CS:

我粘贴源$ C ​​$ C这是最容易得到的。我把这个从网页。

下面是该命令的输出

 的keytool -list -keystore<路径>


  *****************警告警告警告*****************
*存储在您的密钥库信息的完整性*
*尚未验证!为了验证其完整性,*
*您必须提供密钥存储的密码。 *
*****************警告警告警告*****************


  
  

仓库类型:JKS密钥库提供:SUN


 您的密钥存储库包含1项androiddebugkey,15.Mar.2013,PrivateKeyEntry,
证书指纹(SHA1):XXX

main.xml中的文件:

 <?XML版本=1.0编码=UTF-8&GT?;
< com.google.android.maps.MapView
    的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    机器人:ID =@ + ID /图形页面
    机器人:layout_width =FILL_PARENT
    机器人:layout_height =FILL_PARENT
    机器人:可点击=真
    机器人:apiKey =AIzaSyDim-x5Gxxx
/>

清单文件:

 <?XML版本=1.0编码=UTF-8&GT?;
<清单的xmlns:机器人=htt​​p://schemas.android.com/apk/res/android
    包=com.androidhive.googlemaps
    安卓版code =1
    机器人:=的versionName1.0>
<采用-SDK安卓的minSdkVersion =8/>
<应用
        机器人:图标=@绘制/ ic_launcher
        机器人:标签=@字符串/ APP_NAME>
        <! - 加入谷歌地图图书馆 - >
        <使用库机器人:名字=com.google.android.maps/>
        <活动
            机器人:名字=。AndroidGoogleMapsActivity
            机器人:标签=@字符串/ APP_NAME>
            &所述;意图滤光器>
                <作用机器人:名字=android.intent.action.MAIN/>
                <类机器人:名字=android.intent.category.LAUNCHER/>
            &所述; /意图滤光器>
        < /活性GT;
    < /用途>
    <! - 允许带网络连接 - >
    <使用许可权的android:NAME =android.permission.INTERNET对/>
< /清单>

的Java文件(无需粘贴这一切,但我想这是最好的粘贴全部)

http://pastebin.com/yF95Rcbd

下面是我的截图:

http://i.imgur.com/gExHpUG.png

http://i.imgur.com/AMOXKhr.png

http://i.imgur.com/Aqon97Y.png

我想这个应用程序编译到Android 4.2.2,但我想,想使它在2.2及以上工作。

下面的属性窗口的选项卡的Andr​​oid只是为了确保:

http://i.imgur.com/ht0CQwT.png

下面是我的日志

  7月3日至二十日:01:20.145:W / System.err的(956):在java.lang.Thread.run(Thread.java:856)
七月3日至20日:01:20.665:W / System.err的(956):IOException异常处理:26
七月3日至20日:01:20.665:W / System.err的(956):java.io.IOException异常:服务器返回:3
七月3日至20日:01:20.665:W / System.err的(956):在android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
七月3日至20日:01:20.675:W / System.err的(956):在android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
七月3日至20日:01:20.675:W / System.err的(956):在android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
七月3日至20日:01:20.675:W / System.err的(956):在android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
七月3日至20日:01:20.675:W / System.err的(956):在android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)

这些行重复所有的时间。

非常感谢你。
    您的帖子似乎包含code未正确格式为code误
    我删除空行。对不起,我搞砸了codeS。


解决方案

我已经解决了这个问题,


  • 打开你的谷歌API的控制台

  • 选择API访问权限

  • 编辑允许Android应用程序从您的API密钥

  • 您的软件包名称更改包的名称

  • 示例:00:06:A5:0E:04:A2:1E:8F:FE:6B:7F:46:23:C3:XX:XX:XX:XX:XX:XX; com.example.androidmapview

EDIT :

I transferred my 20+ projects that tries to use Google Maps for Android v2. After changing keys and stuff, now, it works. I don't know what made this work, but thank you all. I got one keystore, the key is right. I guess it magically fixed somehow. Well, thanks guys.

I'm doing searches for 2 days and I couldn't fix this problem. I did everything, yet, this application can not work.

I want my application to work on Android 2.2 and above. Like it says "if you create your app in level 8, it'll support 95% of market".

Here are my screenshots and source codes:

I'm pasting the source code which is the easiest to get. I took this from web.

Here's the output of the command

keytool -list -keystore <path>

*****************  WARNING WARNING WARNING  *****************
* The integrity of the information stored in your keystore  *
* has NOT been verified!  In order to verify its integrity, *
* you must provide your keystore password.                  *
*****************  WARNING WARNING WARNING  *****************

Keystore type: JKS Keystore provider: SUN

Your keystore contains 1 entry

androiddebugkey, 15.Mar.2013, PrivateKeyEntry,
Certificate fingerprint (SHA1): xxx

main.xml file:

<?xml version="1.0" encoding="utf-8"?>
<com.google.android.maps.MapView
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/mapView"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:clickable="true"
    android:apiKey="AIzaSyDim-x5Gxxx"
/>

manifest file:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="com.androidhive.googlemaps"
    android:versionCode="1"
    android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name" >
        <!-- Add Google Map Library -->
        <uses-library android:name="com.google.android.maps" />
        <activity
            android:name=".AndroidGoogleMapsActivity"
            android:label="@string/app_name" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    </application>
    <!-- Allow to connect with internet -->
    <uses-permission android:name="android.permission.INTERNET" />
</manifest>

java file (no need to paste it all, but I guess it's best to paste it all)

http://pastebin.com/yF95Rcbd

Here are my screenshots:

http://i.imgur.com/gExHpUG.png

http://i.imgur.com/AMOXKhr.png

http://i.imgur.com/Aqon97Y.png

I'm trying to compile this app to Android 4.2.2, but I tried and want to make it work in 2.2 and above.

Here's the Android tab of the properties window just to make sure:

http://i.imgur.com/ht0CQwT.png

Here's my log

03-20 07:01:20.145: W/System.err(956):  at java.lang.Thread.run(Thread.java:856)
03-20 07:01:20.665: W/System.err(956): IOException processing: 26
03-20 07:01:20.665: W/System.err(956): java.io.IOException: Server returned: 3
03-20 07:01:20.665: W/System.err(956):  at android_maps_conflict_avoidance.com.google.googlenav.map.BaseTileRequest.readResponseData(BaseTileRequest.java:115)
03-20 07:01:20.675: W/System.err(956):  at android_maps_conflict_avoidance.com.google.googlenav.map.MapService$MapTileRequest.readResponseData(MapService.java:1473)
03-20 07:01:20.675: W/System.err(956):  at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.processDataRequest(DataRequestDispatcher.java:1117)
03-20 07:01:20.675: W/System.err(956):  at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher.serviceRequests(DataRequestDispatcher.java:994)
03-20 07:01:20.675: W/System.err(956):  at android_maps_conflict_avoidance.com.google.googlenav.datarequest.DataRequestDispatcher$DispatcherServer.run(DataRequestDispatcher.java:1702)

These lines repeat all the time.

Thank you very much. Your post appears to contain code that is not properly formatted as code" error made me delete the blank lines. Sorry for the messed up codes.

解决方案

I have solved this issue,

  • Open your Google APIs Console
  • Choose API Access
  • Edit allowed Android apps from your API Key
  • Change the package name with your package name
  • Example: 00:06:A5:0E:04:A2:1E:8F:FE:6B:7F:46:23:C3:xx:xx:xx:xx:xx:xx;com.example.androidmapview

这篇关于空白屏幕Android 2.2的谷歌地图V2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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