Comments (9)
试试这个版本:1.8.20-1.0.2-beta01-jdk11 打包记录:https://jitpack.io/#JailedBird/ArouterKspCompiler/1.8.20-1.0.2-beta01-jdk11
试了下不行,就知道不是这个插件的问题了,我使用room的ksp也会出现这个问题。sorry。。。。
目前我把所有module都加了限制:
tasks.withType(KotlinCompile::class.java) {
kotlinOptions {
jvmTarget = JavaVersion.VERSION_11.toString()
}
}
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
这样就可以了,辛苦你了
from arouterkspcompiler.
我不是很懂Java11和Java8的兼容性问题,插件里面使用的 sourceCompatibility = JavaVersion.VERSION_1_8
, demo(app模块)使用的是JDK11的gradle去运行的,没发现问题;
你看看这篇stackoverflow?看看能不能解答疑惑👀
https://stackoverflow.com/questions/69079963/how-to-set-compilejava-task-11-and-compilekotlin-task-1-8-jvm-target-com
from arouterkspcompiler.
如上图是警告,并不是错误。
原因是,我项目里java的版本指定的是11,个别模块依赖了这个arouter的ksp,可能你项目里指定的是1.8
就有了上图的提示,我试图覆盖你指定的1.8但是没生效。
from arouterkspcompiler.
我在这个分支,app模块配置jdk11, 导入jdk8的jitpack 远端依赖,没报这个warning🤣
https://github.com/JailedBird/ArouterKspCompiler/tree/test-jdk11-build-warning
我再看看warning信息吧
from arouterkspcompiler.
复现了类似的问题😂,如下图:
你检查下对应那个模块,compileOptions 和 kotlinOptions 的版本号是不是不一致?
PS: 初步测试不一致会出现你的那个问题,一致(均为11)就不会
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '11'
}
from arouterkspcompiler.
还不行,你就说下Kotlin版本吧,我打一个Java11 的版本,你试试🤣
from arouterkspcompiler.
"1.8.20-1.0.2"这个版本 搞个java11的吧。我试试
from arouterkspcompiler.
试试这个版本:1.8.20-1.0.2-beta01-jdk11
打包记录:https://jitpack.io/#JailedBird/ArouterKspCompiler/1.8.20-1.0.2-beta01-jdk11
from arouterkspcompiler.
上述Kotlin高版本问题,均可参考如上方案:
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
- [ksp] No providers found in processor classpath HOT 2
- 在泛型类使用 @Autowired 注解编译报错 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.