메니페스트 작업완벽하구요..
라이브러리도 확실히 추가했어요 ㅠㅠ
지금 메인 페이지에서 버튼을 누르면
Map이라는 fragmentActivity 로 넘어가야되는데
계속 에러가뜨네요.
+.02-07 00:40:46.189: E/AndroidRuntime(14955): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.omp.fbi/com.omp.fbi.Map}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
02-07 00:40:46.189: E/AndroidRuntime(14955): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.omp.fbi/com.omp.fbi.Map}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
02-07 00:40:46.189: E/AndroidRuntime(14955): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.omp.fbi/com.omp.fbi.Map}: android.view.InflateException: Binary XML file line #7: Error inflating class fragment
이렇게 에러가뜨는데 현재
프래그먼트 액티비티에는요
public class Map extends FragmentActivity {
double latitude =37.519576;
double longitude = 123.940245;
private GoogleMap googleMap;
protected void onCreate(Bundle savedInstanceState){
super.onCreate(savedInstanceState);
setContentView(R.layout.map);
init();
}
protected void onResume(){
super.onResume();
init();
}
void init(){
if(googleMap==null){
googleMap = ((SupportMapFragment)getSupportFragmentManager().findFragmentById(R.id.fragment5)).getMap();
if(googleMap != null){
addMarker();
}
}
}
void addMarker(){
googleMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title("simpe marker"));
}
}
로 되있고
레이아웃에는
<?xml version="1.0" encoding="utf-8"?>
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<fragment
android:id="@+id/fragment5"
android:name="com.google.android.gms.maps.SupportMapFragment"
android:layout_width="match_parent"
android:layout_height="match_parent"
/>
</LinearLayout>
그리고 메인 페이지에서 Map FragmentActivity로 가는 인텐트는요
public void btnContentMenu(View v){
intent = new Intent(this, Map.class);
startActivity(intent);
}
입니다
로 되있습니다..도와주세요 제발 ㅠㅠ