Hilt, androidTest build failed in versions >= 2.40.4
See original GitHub issueLast working version is 2.40.3. Every test class generates next error:
> Task :app:hiltJavaCompileDevDebugAndroidTest
app/build/generated/hilt/component_sources/devDebugAndroidTest/.../..._TestComponentDataSupplier.java:8: error: cannot find symbol
import dagger.hilt.android.internal.testing.root.DaggerDefault_HiltComponents_SingletonC;
^
symbol: class DaggerDefault_HiltComponents_SingletonC
location: package dagger.hilt.android.internal.testing.root
With final error:
error: dagger.internal.codegen.ComponentProcessor was unable to process 'dagger.hilt.android.internal.testing.root.Default_HiltComponents.SingletonC' because not all of its dependencies could be resolved. Check for compilation errors or a circular dependency with generated code.
I don’t see any errors which may hint why Default_HiltComponents.SingletonC
is not generated.
Any more information I can provide?
Issue Analytics
- State:
- Created 2 years ago
- Reactions:4
- Comments:12
Top Results From Across the Web
Error in gradle when implement hilt library in android
This is weird issue even i faced, i solved it by making sure these 2 dependencies version in Build.gradle ...
Read more >Hilt testing guide | Android Developers
This makes Hilt work for all of the instrumented tests in your project. Perform the following steps: Create a custom class that extends...
Read more >Gradle Build Setup - Dagger
When the Android Gradle plugin (AGP) version used in the project is less than 4.2, then the Hilt Gradle plugin by default, will...
Read more >com.google.dagger » hilt-android-testing » 2.40.4
Date and Time Utilities · Top Categories · Home » com.google.dagger » hilt-android-testing » 2.40.4 ... Note: There is a new version for...
Read more >Hilt makes testing easier on Android - YouTube
The best android courses in the world: https://codingwithmitch.com/Watch the HILT course here (FREE): ...
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
After updating to the 2.42 version the initial problem happens again.
@mik9 thanks for the error report!
That error message indicates that
Default_HiltComponents.SingletonC
is already generated but it cannot be processed because one of its dependencies cannot be found on the classpath. I’m currently working on improving the error message to include more information about which exact type could not be found.I should hopefully have something by next week that you can try out using the
HEAD-SNAPSHOT
artifacts. The better error message should allow you to pinpoint what’s going wrong. I’ll update this thread once that’s ready.