Android Studio fails refactoring "read-only" kapt generated code

82 views Asked by At

Working with Kotlin and Dagger I find that if I try to use Android Studio's Refactoring feature to change, e.g., the name of a class that is referenced in the code that kapt autogenerates for Dagger (in $buildDir/generated/source/kapt), that the refactor fails because the autogenerated code is "read-only".

Deleting the build directory is a heavy-handed workaround. Is there a setting or something that will prevent the problem?

0

There are 0 answers