-
Notifications
You must be signed in to change notification settings - Fork 29
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
Classes are generated, but not recognized in AS #187
Comments
I've seen that with other libraries before, but I can't remember what fixed it 😓. Perhaps clear your Android Studio caches and restart? Doesn't sound like there's an issue with the library here though, just the IDE |
The IDE recognizes Dagger generated classes.... so I thought it could have something in PaperParcel. I did execute clean/build multiple times, but it's still happening. I will try the invalidate cache. |
Weird, are the dagger files generated in the same location you mentioned? (i.e. You're using kapt for both dagger and paperparcel right? |
Yes, they are in the same folder. |
I'm experiencing the same issue. PaperParcelDataClassName.CREATOR is not found and dagger complains. Single module project, dagger 2.11, latest PP. Clearing caches doesnt resolve the issue, tho. |
Any chance you have a sample project you could share? |
Actually, the sources are not even generated. Probably, previously generated PP data classes were cleaned and dagger tries to generate dependency code and if the dagger-annotated code has some reference to PP annotated classes, dagger fails. If I set CREATOR to null
and run My dependency graph looks like this (referenced): PP annotated models -> modelsDao(Room) -> Repository -> ViewModels ->Fragments/Activities. I commented on this issue, under assumption that if the sources cant be imported, they dont exist. If you want me I can open new issue and move all this there. |
Same issue here, with Android Studio 3.0 beta 7, kotlin 1.1.4 and parperparcel 2.0.4. The PaperParcelData class isn't generated. |
Could you share your |
I was just able to resolve the issue by following what @NikolaDespotoski said: set CREATOR to null first, compiled the source from Android Studio and saw the generated code in build folder, and then updated the source code to "CREATOR = PaperParcelDataClass.CREATOR". So I'm good for now. |
Super weird. Is that using instant run, or something else that might not trigger the annotation processor to run? Sometimes you might need to use Android Studio's |
The project was building and running fine with paperparcel 1.0.1, and I was migrating to 2.x, so thought it might be a caching issue and tried 'Clean Project' + 'Rebuild Project', as well as invalidating the cache and restarting AS, but none was helping. |
I know this is two years old now, but I discovered it while trying to solve the same problem this week. The solution that worked for me was to change the filename (but not the class name) so that it was shorter. I suspect that there is a inherent limit to the length of the path to the file which is causing the problem. |
Hi, I am trying to use PaperParcel in my
data class
models, it does compile and run, but Android Studio is not indexing/recognizing the generated files.Android Studio version 2.3.3
Kotlin version 1.1.3-2
My project is a multi-module project and I am using PaperParcel in one library module.
My project has multiple flavors and build types.
I see the generated code under
$library/build/generated/source/kapt/release/$packages_path
The text was updated successfully, but these errors were encountered: