구글맵을 불러오는 예제를 만들었습니다. 아래 강좌를 보고 만들었는데요.


저는 위와 같이 에러가 뜨는 군요...

물론 apiKey 문제없이 만들어서 넣어주었구요...

main.xml 내용입니다

===================================================================================================================

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:orientation="vertical"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    >
<TextView  
    android:layout_width="fill_parent" 
    android:layout_height="wrap_content" 
    android:text="@string/hello"
    />
    
    
    
<com.google.android.maps.MapView
android:id="@+id/maps"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:enabled="true"
android:clickable="true"
android:apiKey="05dxuKtlwPSuCo_QgHZhBEdC-Er9ll7n6tFTObw"
/>
</LinearLayout>

======================================================================================================================
googlemap.java 내용입니다.

========================================================================================================================

import android.os.Bundle;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.MapActivity;
import com.google.android.maps.MapController;
import com.google.android.maps.MapView;



public class googleMaps extends Activity {
    /** Called when the activity is first created. */
private MapView myMap;
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        myMap = (MapView)findViewByld(R.id.maps);
        myMap.setSatellite(true);
        
        GeoPoint p = new GeoPoint(40756054, -73986951);
        my.Map.displayZoomControls(true);
        MapController mc = myMap.getController();
        mc.animateTo(p);
        mc.setZoom(5);
        
    }
    
    @Override
    protected boolean isRouteDisplayed(){
     return false;
    }
}
=====================================================================================================================
에러는 위의 googlemap.java의 impor com.google. * 에서 전부 에러가 납니다.

AndroidManifest.xml 내용입니다.

========================================================================================================================
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
      package="com.tistory.kepricon"
      android:versionCode="1"
      android:versionName="1.0">
      
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.INTERNET" />      
      
      
      
    <application android:icon="@drawable/icon" android:label="@string/app_name">
    <uses-library android:name="com.google.android.maps" />
        <activity android:name=".googleMaps"
                  android:label="@string/app_name">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>

    </application>
    <uses-sdk android:minSdkVersion="6" />

</manifest> 
===========================================================================================================

굵게 표시한 부분처럼 라이브러리도 추가해 줬고... 퍼미션도 줬고...

그런데 에러가 나는 군요...

아래는 에러 메시지 입니다.

googlemap.JPG



저는 왜 그런지 이유를 모르겠는데요...

구글에서 찾은 건데... com.google.android.maps.jar인가가 있는지 찾아보라고...
그걸 어디다 넣어야 한다던데..
일단 파일 검색해본 결과 위의 파일은 제가 가지고 있지 않더군요...
이걸 찾아서 어디다 넣어야 하나요?

위의 패키지가 없어서 그런거 맞나요?

제 안드로이도 SDK 디렉토리는 아래와 같습니다.

C:\AND\android-sdk_r04-windows\android-sdk-windows

만약 위의 패키지를 혹시 제가 인터넷에서 찾았다고 하더라도 그걸 위의 패키지에 넣어야 하나요?

아님 자바에 넣어야 하나요..

C:\Program Files\Java

저의 자바 주소는 위와 같은데요...

아시는 분 답글 좀 달아주세요.