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;
}