我正在开发一个使用片段的应用程序。我的一个片段,我想使用谷歌地图,但我得到错误。
public class Map extends Fragment {
public Map() {
// Required empty public constructor
}
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
}
我正在使用谷歌地图的碎片。地图加载第一次是完美的,但是当我试图从另一个片段返回包含google地图的片段时,它崩溃了,错误如下。
android.view.InflateException: Binary XML file line #14: Error inflating class fragment
以下是初始化片段的代码
SupportMapFragment fragment
在onCreateView中
fragment = (SupportMapFragment)getChildFragmentManager().findFragmentById(R.id.map);
fra
我试图使用v4支持库将Google添加到一个片段中,但我在使用getMap()引用它时遇到了一些困难。
我将添加类似于这样的片段(如中的示例):
public class MainActivity extends FragmentActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main);
if (findViewBy
我正在尝试在我的xamarin android项目中使用谷歌地图。我已经安装了Google Play服务-地图,并在Google控制台中创建了一个API密钥。我在我的活动中使用了片段来显示地图,如下所示。
但是当我尝试实例化这个应用程序时,它抛出了这个异常:"Android.Views.InflateException: Binary XML file line #1: Error inflating class fragment。“
请帮帮我。谢谢。
我在片段中使用MapView。现在它没有装载。(或者准确地说,它加载,但不加载。是的,很奇怪,附图。)
当映射加载(或未能加载/尝试加载)时,控制台上的一些日志
W/DynamiteModule: Local module descriptor class for com.google.android.gms.googlecertificates not found.
I/DynamiteModule: Considering local module com.google.android.gms.googlecertificates:0 and remote module com.goo