Comments (2)
感谢指出问题,修复方案如下:
Test case:
+interface TestInterface1
interface TestInterface2
abstract class AbstactGenericAcitivty1<T : TestInterface1> : AppCompatActivity() {
@Autowired
var list = mutableListOf<String>()
}
abstract class AbstactGenericAcitivty2<T : TestInterface1, G:TestInterface2> : AppCompatActivity() {
@Autowired
var list = mutableListOf<String>()
}
@Route(path = "/app/TestAbstactGenericAcitivty1")
class TestAbstactGenericAcitivty1 : AbstactGenericAcitivty1<TestInterface1>(){
@Autowired
var t = mutableListOf<String>()
}
@Route(path = "/app/TestAbstactGenericAcitivty2")
class TestAbstactGenericAcitivty2 : AbstactGenericAcitivty2<TestInterface1, TestInterface2>(){
@Autowired
var t = mutableListOf<String>()
}
结果:
val substitute = (target as? AbstactGenericAcitivty1<*>)?: throw IllegalStateException(
"The target that needs to be injected must be AbstactGenericAcitivty1, please check your code!"
)
val substitute = (target as? AbstactGenericAcitivty2<*, *>)?: throw IllegalStateException(
"The target that needs to be injected must be AbstactGenericAcitivty2, please check your code!"
)
from arouterkspcompiler.
见README最新版本,请更新到xxx-1.0.4
from arouterkspcompiler.
Related Issues (14)
- 能支持AGP7.3吗? HOT 1
- 使用withStringArrayList在接收参数地方会出现One type argument expected for typealias ArrayList<E> = ArrayList<E> HOT 7
- 大佬啥时候kt升到1.8.10啊 HOT 2
- withStringArrayList传参接收不到... HOT 4
- 能支持下java11么? HOT 9
- [ksp] No providers found in processor classpath HOT 2
- ksp 最新版本 HOT 17
- 请教一下作者 HOT 5
- 为什么会有kotlin1.7.22这个版本 HOT 1
- 关于Arouter 使用ksp 后,无法覆盖以前使用Kapt 编译的APP HOT 4
- Type in a class literal must not be nullable HOT 10
- jump到SecondActivtiy就闪退 HOT 1
- 支持KSP 1.9.22-1.0.17 吗 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from arouterkspcompiler.