嗨,我使用了谷歌地图 v2,如果我运行应用程序
public class SocMap extends Activity {
}
打开地图,但我如果运行应用程序
public class SocMap extends FragmentActivity {
}
应用程序崩溃
错误:
04-28 15:10:03.405: E/AndroidRuntime(12041): FATAL EXCEPTION: main
04-28 15:10:03.405: E/AndroidRuntime(12041): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.socmap/com.example.socmap.SocMap}: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
04-28 15:10:03.405: E/AndroidRuntime(12041): Caused by: android.view.InflateException: Binary XML file line #6: Error inflating class fragment
04-28 15:10:03.405: E/AndroidRuntime(12041): Caused by: java.lang.ClassCastException: com.google.android.gms.maps.MapFragment cannot be cast to android.support.v4.app.Fragment