google / google/ksp

Bug: ClassNotFoundException, but it does exist in the project

Open
#1,038 22 comments 1 reaction 0 assignees View on GitHub
bug P3
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

Hello there, I am trying to read my annotation using
```
classDeclaration.getAnnotationsByType(ActivityReference::class).first()
```

and getting this error

```
Caused by: com.google.devtools.ksp.KSTypeNotPresentException: java.lang.ClassNotFoundException: com.veepee.vpcore.route.BarImpl

```
This is a bit odd since the full qualified name in the exception seems to correct.

I tried [this](https://github.com/google/ksp/issues/888), but I still got the same error.

A project to reproduce it is attached [here](https://github.com/google/ksp/files/9077420/ksp-problem.zip)

To my specific needs I don't need to instantiate the annotation, but to get the String with the qualified name for `ActivityReference.activityName`, would it be possible with KSP ?

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.