New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[ksp] InjectProcessingStep was unable to process a class which extends Binder Stub because 'error.NonExistentClass' could not be resolved. #4158
Comments
Links #4049. |
Workaround: // Workaround for https://github.com/google/dagger/issues/4158
androidComponents {
onVariants(selector().all(), { variant ->
afterEvaluate {
def capName = variant.name.capitalize()
tasks.getByName("ksp${capName}Kotlin") {
setSource(tasks.getByName("compile${capName}Aidl").outputs)
}
}
})
} |
I'm facing the exact same issue with SQLDelight. In my case, I was able to make it work by updating // This is written for Gradle KTS
androidComponents {
onVariants(selector().all()) { variant ->
afterEvaluate {
val capName = variant.name.capitalize()
tasks.getByName<KotlinCompile>("ksp${capName}Kotlin") {
setSource(tasks.getByName("generate${capName}DatabaseInterface").outputs)
}
}
}
} |
Filled https://issuetracker.google.com/313669430 for the AGP team as they own the AIDL stub generation. |
https://issuetracker.google.com/313669430 has been fixed, but this issue still gives me the same error when using ksp 1.9.23-1.0.20. Are there any other things I could try? |
@danysantiago any chance you could follow up with the AGP team about this as it still exists for generated code such as for sqldelight. |
@aftabahmadTW This issue was just for AIDL generated code. Even though the error looks similar, I think it could need to be fixed for each code generator depending on where the generated code is outputted. So you should file a separate issue for SQLDelight. |
@Chang-Eric Thanks, I'll create a small reproducer and file a new issue |
There is a class which extends Binder Stub like
(
IUnfoldTransitionListener.Stub
is generated fromIUnfoldTransitionListener.aidl
), provideRemoteUnfoldTransitionReceiver
asThis could be compiled by Hilt Kapt compiler but Hilt KSP compiler, with the error below:
You can repro this issue at LawnchairLauncher/lawnchair#3761 with following steps:
git clone --recursive https://github.com/LawnchairLauncher/lawnchair.git
git checkout repro-hilt-ksp-compiler-issue
./gradlew assembleLawnWithQuickstepDebug
The text was updated successfully, but these errors were encountered: