Fragment加载SceneControl时报错

0 投票

SuperMap 8C IMobile 使用Fragment加载SceneControl时报错 android.view.InflateException: Binary XML file line #12: Binary XML file line #12: Error inflating class com.supermap.realspace.SceneControl,

xml文件如下

<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="@color/colorWhite"
    android:orientation="vertical"
    tools:context=".MainActivity">

    <com.supermap.realspace.SceneControl
        android:id="@+id/scene"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_weight="1" />

    <com.esri.android.map.MapView
        android:id="@+id/map"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:layout_marginTop="1dp"
        android:layout_weight="1" />
</LinearLayout>

fragment代码如下:

@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
                         Bundle savedInstanceState) {
    // Inflate the layout for this fragment
    View view =  inflater.inflate(R.layout.activity_map_23d, container,false);//就是这行报错
    return view;
}
4月 8 分类:  71次浏览 | 用户: kuaij (2 分)

1个回答

0 投票

你好,根据错误信息检查一下你的XML文件是否有语法错误。可以参考一下这篇文章https://www.cnblogs.com/awkflf11/p/5362927.html

4月 8 用户: 董懿鑫 名扬四海 (3,241 分)
...