The Micronaut micronaut-inject-java
dependency should be included in both the annotationProcessor
and compileOnly
scopes of your Android build configuration:
If you use as part of your build you may also need to disable the invalid packages check since Android includes a hard coded check that regards the javax.inject
package as invalid unless you are using Dagger:
android {
}
You can find more information on in the Android documentation.