This allows you to use the same application framework for both your Android client and server implementation.

    To get started you must add the Micronaut annotation processors to the processor classpath using the dependency configuration.

    Example Android build.gradle

    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:

    You can find more information on in the Android documentation.

    Enabling Dependency Injection

    Once you have configured the classpath correctly, the next step is start the .

    Example Android Application Class

    1Extend the android.app.Application class
    2Run the with the ANDROID environment
    3To allow dependency injection of Android Activity instances register a ActivityLifecycleCallbacks instance