【发布时间】:2011-10-24 05:34:57
【问题描述】:
我正在尝试使用 Google 地图开发一个简单的应用程序。 在运行应用程序时,我只能看到网格和地图控件。 我确实获得了一个 API 密钥并将其包含在 main.xml 文件中。 互联网的权限也在 androidmanifest.xml 中授予。 我在 avd 中的浏览器正在连接到互联网,当我在 avd 中运行本机地图应用程序时,它显示以下错误。
**网络故障 ... 错误的远程字符串版本。GMM 服务器必须托管:/strings_remote_533149424.dat**
GoogleMapActivity.java
package com.example.googlemap;
import android.os.Bundle;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapView;
public class GoogleMapActivity extends MapActivity
{
@Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
MapView mapView = (MapView) findViewById(R.id.mapview);
mapView.setBuiltInZoomControls(true);
}
@Override
protected boolean isRouteDisplayed()
{
return false;
}
}
main.xml
<?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="0kuSQz9hsxal-_JpKGJbFp__zLqhl5d4gG3ohDg"
/>
manifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.googlemap"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="10" />
<application android:icon="@drawable/icon" android:label="@string/app_name">
<activity android:name=".GoogleMapActivity"
android:label="@string/app_name"
android:theme="@android:style/Theme.NoTitleBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<uses-library android:name="com.google.android.maps" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
</application>
</manifest>
我正在使用代理连接到互联网。 任何人都可以帮我解决这个问题..请帮帮我!!
【问题讨论】:
标签: android google-maps proxy