google / google/ksp

Generated resources are not compiled to Android resources

Open
#1,225 4 comments 3 reactions 1 assignee Claimed by @ting-yuan View on GitHub
bug
Dominant language
Kotlin
Stars
3.5k
Forks
415
Avg merge
1d 2h
Merged PRs (30d)
53

Description

Hello, I am trying to generate some Android resource XML (like attrs) files based on certain annotations in my source file. While the code generation is working to generate those files. I don't see them being included in the `resources.arsc`

I have included the source set path, the IDE is showing it as source set. But when I generate the APK or when I try to access them in my source code, it's not working.

I do see `resources/` folder in the generated APK. But the contents are not being part of `resources.arsc`.

I have also tried manually creating the files without using `CodeGenerator` to change the directory. If I place the files in `build/generated/res/resValues`, they are being included in `resources.arsc`

Is there a way I can change the resource output directory or configure the tasks to include these files in the resources compilation?

_Feel free to close this if this is not in the scope of 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.