DylanCaiCoding/ViewBindingKTX

java.lang.reflect.InvocationTargetException

asker517 opened this issue · 2 comments

layout file:

<?xml version="1.0" encoding="utf-8"?>
<FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    >

  <com.github.piasy.biv.view.BigImageView
      android:id="@+id/ivImg"
      android:layout_width="match_parent"
      android:layout_height="match_parent"/>

</FrameLayout>

配合Multitype的基类封装,BigImageView换成其他View都正常..但是就是com.github.piasy.biv.view.BigImageView会出这个错
但是在配合fragment封装的基类使用也没有问题

感谢反馈,这个问题还需要再测试一下,InvocationTargetException 是在调用 inflate 静态方法时抛了异常,不是最终的因素。我发了个 1.2.5 版本把原本的异常抛出来了,你升级再试一下看看是什么异常

@DylanCaiCoding 非常感谢,是我写的问题..BigImageView使用前必须要初始化一下他内部的一个东西..不是库本身问题,不过加上具体异常会更利于发现问题