하나는 HTC 이보4G 라는 폰과 갤럭시플레이어 5.8 제품을 사용해서
어떤 앱을 테스트하는데 ..
같은 앱을 실핼시키니까 .. HTC꺼는 문제없이 실행되는데 ..
삼성 갤럭시는 널포인터익셉션이 나옵니다..
해당 로그켓과 해당 소스를 보여드리겠습니다.

public class HHRS_main extends Activity {
private static final String TAG = HHRS_main.class.getName();
private TextView textlocation;
private TextView textAddress;
LocationManager locationManager;
LocationListener locationListener;
Location location;
Geocoder geoCoder;
String messageAddress = "주소를 확인할 수 없음.";
String messageLocation = "위치를 확인할 수 없음.";
double latitude;
double longitude;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
setLayout();
myLocation();
}
/** 현재 위치 정보 시작 */
private void myLocation() {
// 위치 정보를 얻어옴
locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);
String provider = LocationManager.GPS_PROVIDER;
location = locationManager.getLastKnownLocation(provider);
latitude = location.getLatitude();
longitude = location.getLongitude();
messageLocation = String
.format("위도 : %f, 경도: %f", latitude, longitude);
if (location != null) {
textlocation.setText(messageLocation);
textAddress.setText(getAddres());
} else {
textAddress.setText("주소정보를 얻지 못함.");
}
locationListener = new LocationListener() {
@Override
public void onStatusChanged(String provider, int status,
Bundle extras) {
}
@Override
public void onProviderEnabled(String provider) {
}
@Override
public void onProviderDisabled(String provider) {
}
@Override
public void onLocationChanged(Location location) {
// GPS 정보가 변경되었을 경우
// messageLocation = String.format("위도 : %f, 경도: %f", latitude,
// longitude);
textlocation.setText(messageLocation);
textAddress.setText(getAddres());
}
};
locationManager.requestLocationUpdates(locationManager.GPS_PROVIDER, 0,
0, locationListener);
}
private String getAddres() {
Geocoder gc = new Geocoder(getApplicationContext(), Locale.KOREA);
try {
List<Address> addresses = gc
.getFromLocation(latitude, longitude, 1);
StringBuilder sb = new StringBuilder();
if (null != addresses && addresses.size() > 0) {
Address address = addresses.get(0);
sb.append(address.getLocality() + " ");
sb.append(address.getSubLocality() + " ");
sb.append(address.getThoroughfare() + " ");
sb.append(address.getFeatureName());
messageAddress = sb.toString();
}
} catch (IOException e) {
Toast.makeText(HHRS_main.this, "주소를 얻지 못함", 1000).show();
}
return messageAddress;
}
/** 현재 위치 정보 끝 */
/** 레이아웃 시작 */
private void setLayout() {
// XML 레이아웃
TabHost tabHost = (TabHost) findViewById(R.id.tabhost);
tabHost.setup();
TabHost.TabSpec spec;
spec = tabHost.newTabSpec("1");
spec.setContent(R.id.tab1);
spec.setIndicator("행동정보");
tabHost.addTab(spec);
spec = tabHost.newTabSpec("2");
spec.setContent(R.id.tab2);
spec.setIndicator("행동요량");
tabHost.addTab(spec);
spec = tabHost.newTabSpec("3");
spec.setContent(R.id.tab3);
spec.setIndicator("설정");
tabHost.addTab(spec);
textlocation = (TextView) findViewById(R.id.main_location);
textAddress = (TextView) findViewById(R.id.main_address);
}
/** 레이아웃 끝 */
}