Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/203.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android 在Play Store中发布apk后,谷歌地图显示灰色瓷砖_Android_Google Maps_Google Api_Google Maps Android Api 2_Api Key - Fatal编程技术网

Android 在Play Store中发布apk后,谷歌地图显示灰色瓷砖

Android 在Play Store中发布apk后,谷歌地图显示灰色瓷砖,android,google-maps,google-api,google-maps-android-api-2,api-key,Android,Google Maps,Google Api,Google Maps Android Api 2,Api Key,我使用谷歌地图Android API v2在我的应用程序中显示一些地图片段。 在我的应用程序发布到Play Store之前,一切都正常(我在发布之前检查了导出的APK,在侧面加载时工作正常) 我有一个假设,但首先是情况: 我编写并签署应用程序(API密钥也来自我的帐户)。 当应用程序准备就绪时,另一个人(在Play Store中拥有另一个帐户)正在发布该应用程序 是否可能必须从发布应用程序的同一帐户生成API密钥?我感激每一个暗示 我的清单如下所示: <?xml version="1.0"

我使用谷歌地图Android API v2在我的应用程序中显示一些地图片段。 在我的应用程序发布到Play Store之前,一切都正常(我在发布之前检查了导出的APK,在侧面加载时工作正常)

我有一个假设,但首先是情况: 我编写并签署应用程序(API密钥也来自我的帐户)。 当应用程序准备就绪时,另一个人(在Play Store中拥有另一个帐户)正在发布该应用程序

是否可能必须从发布应用程序的同一帐户生成API密钥?我感激每一个暗示

我的清单如下所示:

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="de.example.android"
android:versionCode="9"
android:versionName="2.2.0.1" >

<uses-sdk
    android:minSdkVersion="8"
    android:targetSdkVersion="17" />

<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
<permission android:name="de.example.android.permission.MAPS_RECEIVE"
            android:protectionLevel="signature"></permission> 
<uses-permission android:name="de.example.android.permission.MAPS_RECEIVE"/>    

<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES"/>

<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
<uses-feature android:name="android.hardware.location" android:required="false"/> 
<uses-feature android:name="android.hardware.location.network" android:required="false"/>

<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-feature android:name="android.hardware.location.gps" android:required="false"/>

<uses-feature android:glEsVersion="0x00020000" android:required="true"/>


<application
    android:allowBackup="true"
    android:icon="@drawable/ic_launcher"
    android:label="@string/app_name"
    android:theme="@style/AppBaseTheme">

   <!-- GOOGLE MAPS START -->
        <meta-data 
            android:name="com.google.android.maps.v2.API_KEY"
            android:value="..." />
   <!-- GOOGLE MAPS END -->

    <activity
        android:name="de.example.android.SplashScreen"
        android:label="@string/app_name" 
        android:screenOrientation="portrait"
         android:theme="@style/Theme.Splash">
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>

    <activity
        android:name="de.example.android.MainActivity"
        android:screenOrientation="portrait"
        android:icon="@drawable/ic_launcher_activity"
        android:theme="@style/AppBaseTheme"
        >
    </activity>

    <!-- This Activity is called from a lib  -->
    <activity
     android:name="de.example.testlib.android.MapActivity">                            
    </activity>

</application>


发布应用程序的人是否使用其他密钥库退出APK?

您是否使用创建发布APK时使用的密钥库和别名为地图生成密钥?然后你把它交给你的地图视图了吗?

谷歌生成了两个键,一个用于测试,一个用于生产。在为最终版本编译apk之前,您是否将密钥更改为生产密钥?

是的,我使用相同的密钥库和别名。但我没有将API密钥提供给MapView。我只是把它添加到我的清单上。我的地图视图是一个片段,看起来像这样:这是一个好问题…我会尽快检查。(但我不这么认为,因为我会在更新应用程序时看到这一点)。你的答案是正确的!另一个人退出了应用程序。谢谢NPike!你真的帮了我!!!