Closed bennyhuo closed 1 year ago
Error:One type argument expected for class BannerViewPager<T : Any!> 泛型报错,不支持这种么?
Error:One type argument expected for class BannerViewPager<T : Any!> 泛型报错,不支持这种么?
是的,还不支持泛型类型,可以先把这种 layout 加入 blackList 不生成代码,这部分 layout 手动迁移到 findViewById 或者 ViewBinding
试一下 1.8.20-1.2.0-SNAPSHOT。
1.8.20-1.2.0-SNAPSHOT @bennyhuo Could not find com.kanyun.kace:kace-gradle-plugin:1.8.20-1.2.0-SNAPSHOT.
1.8.20-1.2.0-SNAPSHOT @bennyhuo Could not find com.kanyun.kace:kace-gradle-plugin:1.8.20-1.2.0-SNAPSHOT.
snapshot 依赖需要添加如下 maven 仓库地址: maven { url "https://s01.oss.sonatype.org/content/repositories/snapshots" }
1.8.20-1.2.0-SNAPSHOT @bennyhuo @RicardoJiang 加了也不行,没看到1.8.20-1.2.0相关的。 https://s01.oss.sonatype.org/content/repositories/snapshots/com/kanyun/kace/kace-gradle-plugin/
1.8.20-1.2.0-SNAPSHOT @bennyhuo @RicardoJiang 加了也不行,没看到1.8.20-1.2.0相关的。 https://s01.oss.sonatype.org/content/repositories/snapshots/com/kanyun/kace/kace-gradle-plugin/
现在好了,再看看
Error:One type argument expected for class BannerViewPager<T : Any!> 泛型报错,不支持这种么?
@bennyhuo @RicardoKanYun 接入1.8.20-1.2.0-SNAPSHOT,还有这个地方的泛型报错, error:One type argument expected for class BannerViewPager<T : Any!>
稍等,我 Fix 一下
已经更新,再编译一下试试,版本号不变
已经更新,再编译一下试试,版本号不变
@bennyhuo 更新编译了,还是不行 附BannerViewPager三方库类:
看样子你没有拉到最新的包,编译生成的代码应该是这样:
KaceViewUtils 是这次提交新加的
看样子你没有拉到最新的包,编译生成的代码应该是这样:
KaceViewUtils 是这次提交新加的
嗯,可以了,SNAPSHOT版本不能实时更新问题,设置下SNAPSHOT依赖gradle默认缓存时间就好了。 但是KaceViewUtils没找到(Unresolved reference: KaceViewUtils)?
kace-runtime 也需要清一下缓存的
没有问题的话我准备直接发正式版了。有问题可以随时把 issue 打开。
Generated files from layout contains generic view type cannot compile.
The type of pickerView is
UIKitOptionsExtPickerView<T>
.Consider generating Java source code to avoid the generic arguments by taking advance of the Java raw type.