zhihu / sugaradapter Goto Github PK
View Code? Open in Web Editor NEWMake RecyclerView.Adapter Great Again!
License: Apache License 2.0
Make RecyclerView.Adapter Great Again!
License: Apache License 2.0
参见:https://docs.gradle.org/4.7/userguide/java_plugin.html#sec:incremental_annotation_processing
但是 com.hendraanggrian:r-parser:0.2
使用了 com.sun.source.util.Trees
导致无法增量编译 ……
异常信息如下:
java.lang.RuntimeException: java.lang.ClassNotFoundException: com.zhihu.android.sugaradapter.ContainerDelegateImpl
at com.zhihu.android.sugaradapter.Sugar.getContainerDelegate(Sugar.java:38)
at com.zhihu.android.sugaradapter.SugarAdapter$Builder.add(SugarAdapter.java:63)
at com.zhihu.android.sugaradapter.SugarAdapter$Builder.add(SugarAdapter.java:57)
...
请问如何解决?
为了支持androidx,引入库
implementation 'com.zhihu.android:sugaradapter:1.8.16'
annotationProcessor 'com.zhihu.android:sugaradapter-processor:1.8.16'
编译出错
Error: Default interface methods are only supported starting with Android N (--min-api 24): java.util.Map com.zhihu.android.sugaradapter.ContainerDelegate.getDataClassMap()
对 Java 代码直接硬编写维护性是否欠佳?
problem description
onBindData()
method, which make it impossible to call other bind data method from the original RecyclerView.ViewHolder, such as:public void onBindViewHolder(VH holder, int position, List<Object> payloads) {
onBindViewHolder(holder, position);
}
plz consider to add this method to SugarViewHolder
as well.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.