Support for Kotlin 1.5.20
See original GitHub issueWith Kotlin 1.5.20-RC I get this error.
Works with Kotlin 1.5.10.
Dagger version 2.37
/Users/username/projects/myproject/appname/build/tmp/kapt3/stubs/devAppnameDebug/de/company/appname/ApplicationMain.java:47: error: [Hilt]
public final class ApplicationMain extends company.appname.ApplicationBase {
^
Expected @HiltAndroidApp to have a value. Did you forget to apply the Gradle Plugin? (dagger.hilt.android.plugin)
See https://dagger.dev/hilt/gradle-setup.html
[Hilt] Processing did not complete. See error above for details.
/Users/username/projects/myproject/appname/build/tmp/kapt3/stubs/devAppnameDebug/de/company/appname/ui/SecondFragment.java:43: error: [Hilt]
public final class SecondFragment extends company.appname.ui.base.BaseFragment {
^
Expected @AndroidEntryPoint to have a value. Did you forget to apply the Gradle Plugin? (dagger.hilt.android.plugin)
See https://dagger.dev/hilt/gradle-setup.html
[Hilt] Processing did not complete. See error above for details.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:55
- Comments:9
Top Results From Across the Web
What's new in Kotlin 1.5.20
Version 1.5.20 introduces support for the JSpecify project, which includes the standard unified set of Java nullness annotations.
Read more >Kotlin 1.5.20 Released! - The JetBrains Blog
Kotlin /JVM improvements, including string concatenation via invokedynamic and experimental support for calling Java's Lombok-generated methods ...
Read more >JetBrains - Kotlin 1.5.20 is out! Support for... - Facebook
Kotlin 1.5.20 is out! Support for Java's Lombok annotations in Kotlin/Java sources String concatenation via invokedynamic ⚙️ Stdlib and...
Read more >How has Kotlin/Native 1.5.20 improved compiler bug fixes?
Kotlin continues to stay up to date and updates and fixes the issues in Kotlin 1.5.0. Kotlin 1.5.20 has been released, and makes...
Read more >The Android Gradle plugin supports only Kotlin Gradle plugin ...
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher when flutter run · Ask Question. Asked 1 month ago....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
This sounds like a bug in the kotlin/kapt plugin rather than Hilt. In particular,
javaCompilerOptions.annotationProcessorOptions
are just getting ignored in general, as mentioned in https://github.com/google/dagger/issues/2684#issuecomment-860175674. This ends up causing Hilt to fail because the Hilt Gradle plugin sets these options in HiltGradlePlugin.kt.FWIW, it looks like the processing options set through
kapt.javacOptions
do still work, so as a workaround you can set the options manually:I’ve filed a bug with kotlin here: https://youtrack.jetbrains.com/issue/KT-47416