-3

主なアクティビティがFragmentActivityの場合、Androidアプリケーションがクラッシュします。

これを修正する方法についてのアイデアはありますか?

public class MainActivity extends FragmentActivity {
//...
}
4

1 に答える 1

0

フラグメントを activity_main.xml でラップするだけでよいことがわかりました

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical">

    <fragment
      android:id="@+id/map"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      class="com.google.android.gms.maps.SupportMapFragment"/>

</LinearLayout>
于 2013-01-02T07:32:12.747 に答える