Android Google Map API V2带缩放控件的空白屏幕
我的舱单Android Google Map API V2带缩放控件的空白屏幕,android,google-maps-android-api-2,Android,Google Maps Android Api 2,我的舱单 <?xml version="1.0" encoding="utf-8"?> <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.yousystem.loyalties" android:versionCode="1" android:versionName="1.0"> <u
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.yousystem.loyalties"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk
android:minSdkVersion="10"
android:targetSdkVersion="17"/>
<permission
android:name="com.yousystem.loyalties.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="com.yousystem.loyalties.permission.MAPS_RECEIVE" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:label="@string/app_name"
android:icon="@drawable/ic_launcher"
android:name=".LocalApplication">
<activity
android:name=".LoginActivity"
android:label="@string/app_name"
android:screenOrientation="portrait"
android:noHistory="true">
<intent-filter>
<action android:name="android.intent.action.MAIN"/>
<category android:name="android.intent.category.LAUNCHER"/>
</intent-filter>
</activity>
<activity
android:name=".MasterActivity"
android:clearTaskOnLaunch="true"
android:screenOrientation="portrait"/>
<activity
android:name=".PromotionsActivity"
android:clearTaskOnLaunch="true"
android:screenOrientation="portrait"/>
<activity
android:name=".NewsAndPromotionsDetailsActivity"
android:clearTaskOnLaunch="true"
android:screenOrientation="portrait"/>
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="myKey" />
</application>
</manifest>
显示带有缩放控制的空白屏幕,有什么问题
EDIT1:com.yousystem.loyalties E/Google地图Android API:无法加载地图。联系谷歌服务器时出错。这可能是身份验证问题(但可能是由于网络错误)
EDIT2:修复了带有
现在我无法联系谷歌服务器。建立连接后将进行另一次尝试。这是网络错误。将设备连接到强连接,问题将得到解决。
谢谢,这是一个网络错误。将设备连接到强连接,问题将得到解决。
谢谢,是黑屏还是灰屏?如果为灰色,则99%的几率您输入了错误的API密钥。再检查一遍。
如果屏幕为黑色,则表示使用GLSurface view maps v2时出现问题。尝试将地图放在其自己的活动中以解决问题 是黑屏还是灰屏?如果为灰色,则99%的几率您输入了错误的API密钥。再检查一遍。
如果屏幕为黑色,则表示使用GLSurface view maps v2时出现问题。尝试将地图放在其自己的活动中以解决问题请检查这个帖子:如果你完全确定你做了正确的步骤,仍然看到空白屏幕,然后按照第二个答案,验证缓存在某个地方,尝试手动卸载应用程序(就像你用一个普通的应用程序一样),然后再次“运行”这个项目。如果您完全确定您做了正确的步骤,仍然看到空白屏幕,然后按照第二个答案,验证缓存在某个地方,尝试手动卸载应用程序(就像您使用普通应用程序一样),然后“运行”。再次启动该项目。在实施地图布局活动和清单以及其他必需文件后,应用程序应该使用Android SDK本身提供的密钥库而不是我们自己的密钥库构建。使用密钥库文件
%USERPROFILE%\.android\debug.keystore
(Windows)或$HOME/.android/debug.keystore
(UNIX),别名为“androiddebugkey”,密码为“android”。在实施地图布局活动和清单以及其他所需文件后,应用程序应该使用Android SDK本身提供的密钥库而不是我们自己的密钥库构建。使用别名为“androiddebugkey”和密码为“android”的密钥库文件%USERPROFILE%\.android\debug.keystore
(Windows)或$HOME/.android/debug.keystore
(UNIX)。我面临同样的问题。我刚刚创建了新的android应用程序项目,然后复制粘贴了所有的src和布局文件(或者可以导入),然后再次为新包创建了新的API键。它成功了。我也面临同样的问题。我刚刚创建了新的android应用程序项目,然后复制粘贴了所有的src和布局文件(或者可以导入),然后再次为新包创建了新的API键。它成功了。您的google maps api密钥的值仍然是“mykey”
您必须获得自己的密钥并将其放在那里。您的google maps api密钥的值仍然是“mykey”
你必须有一把自己的钥匙放在那里。这并不能回答这个问题。若要评论或要求作者澄清,请在其帖子下方留下评论-您可以随时在自己的帖子上发表评论,一旦您有足够的评论,您就可以发表评论。我今天遇到了同样的情况,并通过此程序解决了我的问题。这并不能提供问题的答案。要评论或要求作者澄清,请在他们的帖子下方留下评论-你可以随时在自己的帖子上发表评论,一旦你有足够的评论,你就可以发表评论。我今天也遇到了同样的情况,并通过这个程序解决了我的问题。
import com.google.android.gms.maps.SupportMapFragment;
public class LocationsFragment extends SupportMapFragment {
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
super.onCreateView(inflater, container, savedInstanceState);
View view = super.onCreateView(inflater, container, savedInstanceState);
// initMap();
return view;
}
}