Mapview를 사용하여 두 도시 사이의 경로를 찾으려고합니다.Mapview가 안드로이드 장치에서 작동하지 않았습니다.
문제는 Mapview가 작동하지 않습니다. 장치에서지도 대신 회색 격자 및 블록 만 가져 오지만 시뮬레이터에서는 정상적으로 작동합니다.
여기 내 매니페스트
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.MapDirection"
android:versionCode="1"
android:versionName="1.0" >
<uses-sdk android:minSdkVersion="8" />
<application
android:icon="@drawable/ic_launcher"
android:label="@string/app_name" >
<uses-library android:name="com.google.android.maps" />
<activity
android:label="@string/app_name"
android:name=".MapDirectionActivity" >
<intent-filter >
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
</application>
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
</manifest>
여기 내 레이아웃입니다 :
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<com.google.android.maps.MapView
android:id="@+id/mapview"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:clickable="true"
android:apiKey="xxxxxxxxxxxxxxxxxxxxxx"
/>
</LinearLayout>
문제가 해결 되었습니까? –
예. 해결됨 –