You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
App has crashed, executing CustomActivityOnCrash's UncaughtExceptionHandler
android.view.InflateException: Binary XML file line #18 in me.hgj.jetpackmvvm.demo:layout/fragment_home: Binary XML file line #18 in me.hgj.jetpackmvvm.demo:layout/fragment_home: Error inflating class dji.ux.widget.FPVOverlayWidget
Caused by: android.view.InflateException: Binary XML file line #18 in me.hgj.jetpackmvvm.demo:layout/fragment_home: Error inflating class dji.ux.widget.FPVOverlayWidget
Caused by: java.lang.reflect.InvocationTargetException
当我在该框架上使用大疆sdk时,我遇到如下问题
这是错误截图
为了验证我,下载了此项目,将 fragment.xml中加入如下代码
<dji.ux.widget.FPVOverlayWidget android:id="@+id/fpv_overlay_widget" android:layout_width="match_parent" android:layout_height="match_parent" />
我增加了以下依赖
当我使用以下封装时可以正常使用viewbinding
val aClass = (superclass as ParameterizedType).actualTypeArguments[0] as Class<*> try { val method = aClass.getDeclaredMethod("inflate", LayoutInflater::class.java) binding = method.invoke(null, layoutInflater) as T setContentView(binding!!.root) } catch (e: Exception) { e.printStackTrace() }
我不是很清楚您的封装问题出在哪里
The text was updated successfully, but these errors were encountered: