Tag: supportmapfragment mapfragment

有问题从fragmentManager / MapFragment移动到supportfragmentManager / SupportMapFragment

所以我能够使用MapFragment没有问题,但是当我将其更改为支持MapFragment的时候,它已经退出了。 与下面的错误。 不知道我做错了,一个工程,另一个没有。 我需要支持的一个原因是,我不能删除使用mapfragment时的片段,因为下面的行是expectin片段! 并正在接收MapFragment …..所以它失败了…当我切换到SupportMapFragment下面的行的作品,但错误发生在下面。 谢谢 getFragmentManager().beginTransaction().remove(mapFragment).commit(); XML <fragment android:id="@+id/mapF" class="com.google.android.gms.maps.SupportMapFragment" android:layout_width="match_parent" android:layout_height="200dp" /> 类 import android.location.Address import android.os.Bundle import android.support.v4.app.Fragment import android.util.Log import android.view.LayoutInflater import android.view.View import android.view.ViewGroup import com.google.android.gms.maps.* import com.google.android.gms.maps.model.LatLng import com.google.android.gms.maps.model.MarkerOptions import android.location.Geocoder import android.text.Html import android.webkit.WebView import android.widget.Toast import com.beust.klaxon.JsonObject import com.beust.klaxon.Parser import com.beust.klaxon.obj import com.beust.klaxon.string import com.github.kittinunf.fuel.httpGet import […]