카피 앤 페이스트를 많이 해서 소스가 좀 난잡합니다.
오류가 나는 부분이 MapView 에서 Marker를 클릭하면 Marker.java 파일의 onTap(int index) 메서드를
호출하고 AlertDialog 를 띄웁니다. 확인을 누르면 MyPositionMap.java 파일의 onTextInput() 메서드를
호출하고
intent = new Intent(this,MyActivity.class);
  startActivity(intent);
를 실행하는데 에러가 발생됩니다. 에러 내용은

10-22 07:16:38.468: ERROR/AndroidRuntime(334): Uncaught handler: thread main exiting due to uncaught exception
10-22 07:16:38.477: ERROR/AndroidRuntime(334): java.lang.NullPointerException
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at android.content.ContextWrapper.getPackageName(ContextWrapper.java:120)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at android.content.ComponentName.<init>(ComponentName.java:75)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at android.content.Intent.<init>(Intent.java:2551)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at com.medi.study.MyPositionMap.onTextInput(MyPositionMap.java:382)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at com.medi.study.Marker$1.onClick(Marker.java:94)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at com.android.internal.app.AlertController$ButtonHandler.handleMessage(AlertController.java:158)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at android.os.Handler.dispatchMessage(Handler.java:99)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at android.os.Looper.loop(Looper.java:123)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at android.app.ActivityThread.main(ActivityThread.java:4363)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at java.lang.reflect.Method.invokeNative(Native Method)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at java.lang.reflect.Method.invoke(Method.java:521)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
10-22 07:16:38.477: ERROR/AndroidRuntime(334):     at dalvik.system.NativeStart.main(Native Method)

실제 로그를 찍어봐도

Log.i("log","+"+this.toString());
  Log.i("log","+"+MyActivity.class.toString());

10-22 07:16:38.437: INFO/log(334): +com.medi.study.MyPositionMap@43d372a8
10-22 07:16:38.447: INFO/log(334): +class com.medi.study.MyActivity

정상적으로 값이 찍히는 데 위와같은 에러가 발생되는데
원인좀 찾아주세요. 부탁드려요.

************* 첫번째 소스 MyPositionMap.java
package com.medi.study;

import java.io.IOException;
import java.io.Serializable;
import java.util.List;

import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.location.Address;
import android.location.Criteria;
import android.location.Geocoder;
import android.location.Location;
import android.location.LocationListener;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.view.GestureDetector;
import android.view.Menu;
import android.view.MenuItem;
import android.view.MotionEvent;
import android.view.GestureDetector.OnGestureListener;
import android.widget.TextView;

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


@SuppressWarnings("serial")
public class MyPositionMap extends MapActivity implements OnGestureListener,Serializable{
 MapView mMap;
 MapController mControl;
 
 // 위치 정보를 얻기 위한 매니져
 LocationManager mLocationManager;
 
 private List<Overlay> listOfOverlays; //맵에 표시된 오버레이(레이어)들을 가지고 있는 리스트
 private String bestProvider; //현재 위치값을 가져오기위한 프로바이더. (network, gps)
 
 private long lastTouchTimeDown = -1;
 private long lastTouchTimeUp = -1;
 
 Double latitude = 0.0;
 Double longitude = 0.0;
 
 //지명 검색을 위한 클래스
 Geocoder mGeoCoder;
 TextView mStatusText;
 
 // 맵 롱클릭 추가를 위해 추가
 private Location currentLocation; //현재위치
 private LocationManager locM; //위치 매니저
 private LocationListener locL; //위치 리스너
 
 Intent intent;
 
 protected boolean isRouteDisplayed() {
  // 경로를 표시해 줄 것인지의 여부
  return false;
 }
 
 private final class SimpleGestureListener extends GestureDetector.SimpleOnGestureListener {
       // Implementation
 }
 
 private GestureDetector mGestureDetector;


 @SuppressWarnings("null")
 public void onCreate(Bundle savedInstanceState) {
  super.onCreate(savedInstanceState);
  setContentView(R.layout.maps);
  
  //overlayHere = null;
  //overlayBranch = null; //각 오버레이 초기화
  
  //인텐트로부터의 파라미터 구하기 (5)  
  Bundle extras=getIntent().getExtras();
  if (extras!=null){
   latitude=extras.getDouble("latitude");
   longitude=extras.getDouble("longitude");
  }else{
   latitude = 37.491885;
   longitude = 127.039289;
  }
  
  Log.i("log","1::"+latitude.toString());
  Log.i("log","2::"+longitude.toString());
  
  mMap = (MapView)findViewById(R.id.map_view); // 맵뷰 객체를 가져온다.
  mControl = mMap.getController(); //맵 컨트롤러를 가져온다.
  mControl.setZoom(16); // 초기 확대 16으로 지정
  mMap.setBuiltInZoomControls(true);
  
  Drawable marker = getResources().getDrawable(R.drawable.marker);
  marker.setBounds(0, 0,
       marker.getIntrinsicWidth(),
       marker.getIntrinsicHeight());
  
  
  
  GeoPoint pt = new GeoPoint((int) (latitude* 1E6), (int) (longitude* 1E6));
  mControl.setCenter(pt);
  
  Marker itemizedOverlay = new Marker(marker,this,mMap);
  
  OverlayItem overlayitem = new OverlayItem(pt, "안녕", "서울");
  itemizedOverlay.addOverlay(overlayitem);
  mMap.getOverlays().add((itemizedOverlay));
  Log.i("log","11111");
  
  //Toast.makeText(this, "위도:"+lct.getLatitude()+"\n"+"경도:"+lct.getLongitude(), 3000).show();
  
  locM = (LocationManager)getSystemService(Context.LOCATION_SERVICE);
  Log.i("log","22222");
  //Criteria 클래스를 이용하여 요구조건을 명시하여, 가장 적합한 기술을 결정
  Criteria criteria = new Criteria();
  criteria.setAccuracy(Criteria.ACCURACY_COARSE);
  criteria.setPowerRequirement(Criteria.POWER_LOW);
  criteria.setAltitudeRequired(false);
  criteria.setBearingRequired(false);
  criteria.setSpeedRequired(false);
  criteria.setCostAllowed(true);
  Log.i("log","33333");
  //true=현재 이용가능한 공급자 제한 (return String)
  //false (return List<String>)
  String bestProvider = locM.getBestProvider(criteria, true);
  //현재 위치
  Location location = locM.getLastKnownLocation(bestProvider);
  Log.i("log","44444");
  
  
  //위치 매니저를 시스템으로부터 받아온다.
  locM = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
  
  //onTouchEvent 의 ACTION_DOWN 등을 가지고 직접 처리 하지 않고
  //제스처들을 쉽게 캐치할수있는 리스너이다.
  OnGestureListener onGestureListener;
  Log.i("log","66666");
  mGestureDetector = new GestureDetector(this, new SimpleGestureListener());
  Log.i("log","77777");
 }
 
 public boolean onTouchEvent(MotionEvent e) {
  Log.i("log","onTouch");
      
        return true;
    }
 
 protected void updateOverlay(Location location) {
  //기존에 화면에 찍어둔 오버레이 (마커들)을 싹 지운다.
  listOfOverlays = mMap.getOverlays(); //맵뷰에서 오버레이 리스트를 가져온다.
  if (listOfOverlays.size() > 0) {
  listOfOverlays.clear(); //오버레이가 있을때 싹 지워준다.
   Log.d("log", "clear overlays : " + listOfOverlays.size());
  } else {
   Log.d("log", "empty overlays");
  }
 }

 private void showLocationName() {
  // 좌표 변환
  StringBuffer buff = new StringBuffer();
  try{
   List<Address> addrs = mGeoCoder.getFromLocation(latitude,longitude,1);
   
   for(Address addr : addrs){
    int index = addr.getMaxAddressLineIndex();
    for(int i=0; i <= index; ++i){
     buff.append(addr.getAddressLine(i));
     buff.append(" ");
    }
    buff.append("\n");
   }
  }catch(IOException e){
   Log.e("exp",e.toString());
  }
  
  mStatusText.setText(buff.toString());
  
 }

 public boolean onCreateOptionsMenu(Menu menu) {
  super.onCreateOptionsMenu(menu); //옵션 메뉴를 추가한다.
  menu.add(0,1,0,"지도");
  menu.add(0,2,0,"위성");
  menu.add(0,3,0,"검색");

  return true;
 }

 public boolean onOptionsItemSelected(MenuItem item) {
  switch (item.getItemId()) { //옵션 메뉴 선택에 따른 액션을 취한다.
  case 1:
   mMap.setSatellite(false);
   return true;
  case 2:
   mMap.setSatellite(true);
   return true;
  case 3:
   intent = new Intent(MyPositionMap.this, AddressSearch.class);
   Log.i("log","=================="+intent.toString());
   Log.i("log","=================="+MyPositionMap.this.toString());
   Log.i("log","=================="+AddressSearch.class.toString());
   startActivity(intent);
     
   return true;
  }
  return false;
 }
 
 private GeoPoint getPoint(double lat, double lon) {
  return (new GeoPoint((int) (lat * 1000000.0), (int) (lon * 1000000.0)));
 }

 @Override
 public boolean onDown(MotionEvent e) {
  // TODO Auto-generated method stub
  Log.i("log","1");
  return false;
 }

 @Override
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,
   float velocityY) {
  // TODO Auto-generated method stub
  Log.i("log","2");
  return false;
 }

 @Override
 public void onLongPress(MotionEvent e) {
  // TODO Auto-generated method stub
  Log.i("log","3");
 }

 @Override
 public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,
   float distanceY) {
  // TODO Auto-generated method stub
  Log.i("log","4");
  return false;
 }

 @Override
 public void onShowPress(MotionEvent e) {
  // TODO Auto-generated method stub
  Log.i("log","5");
  
 }

 @Override
 public boolean onSingleTapUp(MotionEvent e) {
  // TODO Auto-generated method stub
  Log.i("log","6");
  return false;
 }
 
 public void onTextInput(String textCtx){
  Log.i("log","+"+this.toString());
  Log.i("log","+"+MyActivity.class.toString());
  intent = new Intent(this,MyActivity.class);
  startActivity(intent);
 
 }
}


*************** 두번째 소스  : Marker.java
package com.medi.study;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Locale;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.location.Address;
import android.location.Geocoder;
import android.util.Log;
import android.view.GestureDetector;
import android.view.MotionEvent;
import android.view.GestureDetector.OnGestureListener;
import android.widget.TextView;
import android.widget.Toast;
import com.medi.study.MyPositionMap;

import com.google.android.maps.GeoPoint;
import com.google.android.maps.ItemizedOverlay;
import com.google.android.maps.MapView;
import com.google.android.maps.OverlayItem;

public class Marker extends ItemizedOverlay<OverlayItem> implements OnGestureListener,Serializable{

 private Context mContext;
 private ArrayList<OverlayItem> mOverlays = new ArrayList<OverlayItem>();
 private ArrayList<String> addr_nm = new ArrayList<String>();
 private GestureDetector mGestureDetector; 
 private GeoPoint markpoint = new GeoPoint(0,0);
 private MapView view;
 private Drawable marker;
 private boolean longTouch = false;

 MyPositionMap omap = new MyPositionMap();
 TextView mtext = null;

 public Marker(Drawable defaultMarker, Context context, MapView mapview) {
  super(boundCenterBottom(defaultMarker));
  // TODO Auto-generated constructor stub
  marker = defaultMarker;
  mContext = context;
  mGestureDetector = new GestureDetector(this);
  view = mapview;
  omap.intent = new Intent();
  //  populate();
  
  // 내 위치 주소를 배열에 먼저 담음.
  StringBuilder geoString = new StringBuilder();
  try {
   Geocoder goecoder = new Geocoder(mContext,Locale.getDefault());
   Address adr = goecoder.getFromLocation(37.491885,127.039289, 1).get(0);
   if (adr.getFeatureName() != null) geoString.append(adr.getFeatureName()).append(" ");
   if (adr.getThoroughfare() != null) geoString.append(adr.getThoroughfare()).append(" ");
   if (adr.getLocality() != null) geoString.append(adr.getLocality()).append(" ");
   if (adr.getCountryName() != null) geoString.append(adr.getCountryName());
   if (!"".equals(geoString.toString())) geoString.append("\n\n");
  }catch (Exception e) {
   geoString.append("exception 발생");
  }
  
  addAddr_nm(geoString.toString());
   
 }


 public void addOverlay(OverlayItem overlay){
  mOverlays.add(overlay);
  populate();
  view.invalidate(); 
 }
 
 public void addAddr_nm(String nm){
  addr_nm.add(nm);
  populate();
  view.invalidate(); 
 }

 protected boolean onTap(int index) {
  Log.i("log","---------------------::"+addr_nm.get(index));
  final String prm_nm = addr_nm.get(index);
  AlertDialog.Builder alert = new AlertDialog.Builder(mContext)
   .setIcon(R.drawable.icon)
   .setTitle("약속장소 전송")
   .setMessage("약속장소를 "+prm_nm+"로 정하시겠습니까?")
   .setPositiveButton("예",new DialogInterface.OnClickListener() {
    
    @Override
    public void onClick(DialogInterface dialog, int which) {
     omap.onTextInput(prm_nm);
     dialog.dismiss();
    }
   });
 
  alert.setNegativeButton("아니오", new DialogInterface.OnClickListener() {
      @Override
      public void onClick(DialogInterface dialog, int which) {
          dialog.dismiss();
          
      }
  });
  alert.show();

  return true;
 }
 
 public boolean onTap(GeoPoint p, MapView mapView) {
  // TODO Auto-generated method stub
  boolean tapped = super.onTap(p, mapView); 
  if(!tapped){
   markpoint = p;
  
   if(longTouch == true){
    
    Drawable logo = mContext.getResources().getDrawable(R.drawable.marker);
    StringBuilder geoString = new StringBuilder();
    double lat = (double)p.getLatitudeE6()/1000000;
    double lng = (double)p.getLongitudeE6()/1000000;
    try {
     Geocoder goecoder = new Geocoder(mContext,Locale.getDefault());
     Address adr = goecoder.getFromLocation(lat,lng, 1).get(0);
     if (adr.getFeatureName() != null) geoString.append(adr.getFeatureName()).append(" ");
     if (adr.getThoroughfare() != null) geoString.append(adr.getThoroughfare()).append(" ");
     if (adr.getLocality() != null) geoString.append(adr.getLocality()).append(" ");
     if (adr.getCountryName() != null) geoString.append(adr.getCountryName());
     if (!"".equals(geoString.toString())) geoString.append("\n\n");
     longTouch = false;
    }catch (Exception e) {
     geoString.append("위도 : ").append(p.getLatitudeE6()).append(" ,경도 : ").append(p.getLongitudeE6());
    }
    
    logo.setBounds(0, 0, logo.getIntrinsicWidth(), logo.getIntrinsicHeight());
    OverlayItem overlayitem = new OverlayItem(p, "안녕", "서울");
    addOverlay(overlayitem);
    addAddr_nm(geoString.toString());
    
    
    Toast.makeText(mContext, geoString.toString(),Toast.LENGTH_LONG).show();
   }
  }
  return true;
 }

 protected OverlayItem createItem(int i) {
  // TODO Auto-generated method stub
  Log.i("log", "createItem");
  return mOverlays.get(i);
 }
 
 public int size() {
  // TODO Auto-generated method stub
  Log.i("log", "size");
  return mOverlays.size(); 
 }

 public boolean onDown(MotionEvent e) {
  // TODO Auto-generated method stub
  Log.i("log", "onDown");
  return false;
 }
 
 public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {
  // TODO Auto-generated method stub
  Log.i("log", "onFling");
  return false;
 }

 public void onLongPress(MotionEvent e) {
  // TODO Auto-generated method stub
  Log.i("log", "onLongPress");
  Log.d("touch", "onShowPress");


  longTouch = true;
 
 }


 public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {
  // TODO Auto-generated method stub
  Log.i("log", "onScroll");
  return false;
 }
 
 public void onShowPress(MotionEvent e) {
  // TODO Auto-generated method stub }
  Log.i("log", "onShowPress");
 }
 
 public boolean onSingleTapUp(MotionEvent e) {
  // TODO Auto-generated method stub
  Log.i("log", "onSingleTapUp");
  return false;
 
 }


 public boolean onTouchEvent(MotionEvent event, MapView mapView) {
 // TODO Auto-generated method stub 
  Log.i("log", "onTouchEvent");
  return mGestureDetector.onTouchEvent(event);
 }
}