enter code here
Google지도를 안드로이드 에뮬레이터 에서 보여주는 프로젝트를 만들었습니다.하지만 여전히 내 에뮬레이터에서지도가 표시되지 않습니다. Google API 키를 사용하고 있습니다.Android-Mobile에서 Google지도를 표시하는 방법
내 SHAFingerprint를 사용하여 Google API 키를 생성하고이를 내 Manifest에 포함 시켰습니다.
Google Play 서비스 라이브러리 라이브러리 및 jar 파일도 참조했습니다.
인터넷에서 검색했을 때 일부만지도가 휴대 전화에서 볼 수 있다고 말했고 안드로이드 에뮬레이터에서는 표시되지 않습니다.
실수가 있다면 알려주세요 .. 에뮬레이터 또는 ororid 모빌에지도를 표시하는 새로운 방법이 있다면 어떻게 할 지 알려주세요. 여기
는 ... 여기
XML 파일 여기android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".MainActivity" >
<fragment
android:id="@+id/map"
android:name="com.google.android.gms.maps.MapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent" />
내 안드로이드 매니페스트 코드에 내 코드입니다 MainActivity
private GoogleMap mMap;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
//Add a marker
mMap = ((MapFragment) getFragmentManager().findFragmentById(R.id.map)).getMap();
}
} 내 코드입니다
<uses-sdk
android:minSdkVersion="11"
android:targetSdkVersion="17" />
<permission
android:name="com.example.mapviewv2example.permission.MAPS_RECEIVE"
android:protectionLevel="signature" />
<uses-feature
android:glEsVersion="0x00020000"
android:required="true" />
<uses-permission android:name="com.example.mapviewv2example.permission.MAPS_RECEIVE" />
<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" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<!--
The following two permissions are not required to use
Google Maps Android API v2, but are recommended.
-->
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/AppTheme" >
<activity
android:name="com.example.mapviewv2example.MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<meta-data
android:name="--------------------------------//some values"
android:value="-------------------------------//Google API KEY value" />
</application>
사람은 v2를 구글 안드로이드지도 API를 참조 ... 열심히 응답을 기다리는 중 ...... 문제를 해결하기 위해
미리 감사드립니다 .. 순간
AFAIK, 안드로이드 에뮬레이터는 여전히지도 V2를 지원하지 않습니다. – CommonsWare
minsdk를 11에서 12로 변경합니다. – Raghunandan
@CommonsWare : Android 4.2.2 이상 버전에서 Google API 플랫폼에는 Google Play 서비스가 포함됩니다. 따라서 Maps V2는 4.2.2 버전 이상의 에뮬레이터에서 작동 할 수 있습니다. – Arshu