Closed cfy137000 closed 1 year ago
internal inline val View.webContainer
get() = findViewById(R.id.webContainer) as ScrollWebFrameLayout
直接修改成这样,当findViewById
返回为 null 的时候会抛出异常,修改为as?
又会导致返回类型强制变为可空
在低版本上有问题本质上因为 compileSdkVersion 过低且你们是系统应用无法修改,应该是个比较小众的需求,抱歉本库暂不支持,如果有需要可以 fork 代码修改
项目环境:
问题描述: KACE在编译时会生成类似于如下代码:
通过findViewById方法来确定View, 但是在Android7.1平台中, findViewById方法并没有添加带泛型的实现, 只有返回View的实现, 所以在编译时, 上述的方法会报错
在Android7.1中, 应该将生成的代码修改为类似下面这种形式:
综上, 希望增加一个开关能够开启针对低版本Android的适配