---
title: "Discussion on \"How to Implement Hilt in Android App?\" | Hashnode"
description: "Discussion on \"How to Implement Hilt in Android App?\". Dependency injection library is hard to use, this article provides the simple and easy to follow steps to Implement Hilt in your Android app."
url: "https://hashnode.com/posts/how-to-implement-hilt-in-android-app/61fdc484fd8b083e5728ba29"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How to Implement Hilt in Android App?](https://vtsen.hashnode.dev/how-to-implement-hilt-in-android-app?utm_source=hashnode&utm_medium=feed)

Dependency injection library is hard to use, this article provides the simple and easy to follow steps to Implement Hilt in your Android app.

Feb 5, 2022 · 5 min read · vtsen.hashnode.dev  
Updated Oct 24, 2022  
Read the article

-   [#android](https://hashnode.com/tag/android)
-   [#android-apps](https://hashnode.com/tag/android-apps)
-   [#android-app-development](https://hashnode.com/tag/android-app-development)
-   [#beginners](https://hashnode.com/tag/beginners)
-   [#dependency-injection](https://hashnode.com/tag/dependency-injection)

## Written by

[Vincent Tsen](https://hashnode.com/@vtsen)

@vtsen · Sydney

  
[View profile](https://hashnode.com/@vtsen)

Native Android Kotlin Developer

I'm a self-taught hobbyist Android developer who loves to build projects and share valuable tips for new Android developers. Feel free to comment, share or connect with me!

## Responses 2

Markdown supported · ⌘↵ to post

[Maksim Filatov](https://hashnode.com/@MaksimF)

[Nov 17, 2022](https://hashnode.com/posts/how-to-implement-hilt-in-android-app/61fdc484fd8b083e5728ba29/comment/63763950e2d53d6fdf264d4d)

There is an exception in your WorkManager (SyncWorker).

```
E/WM-WorkerWrapper: Work [ id=6af5c166-3d6b-4676-84be-e9d89ca36521, tags={ vtsen.hashnode.dev.androidnews.app.workers.SyncWorker } ] failed because it threw an exception/error
    java.util.concurrent.ExecutionException: kotlin.UninitializedPropertyAccessException: lateinit property repository has not been initialized
        at androidx.work.impl.utils.futures.AbstractFuture.getDoneValue(AbstractFuture.java:516)
        at androidx.work.impl.utils.futures.AbstractFuture.get(AbstractFuture.java:475)
        at androidx.work.impl.WorkerWrapper$2.run(WorkerWrapper.java:311)
        at androidx.work.impl.utils.SerialExecutor$Task.run(SerialExecutor.java:91)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at java.lang.Thread.run(Thread.java:920)
     Caused by: kotlin.UninitializedPropertyAccessException: lateinit property repository has not been initialized
```

[Maksim Filatov](https://hashnode.com/@MaksimF)

[Nov 17, 2022](https://hashnode.com/posts/how-to-implement-hilt-in-android-app/61fdc484fd8b083e5728ba29/comment/63763950e2d53d6fdf264d4d#reply-637640d1f0820773cfb15637)

I think there is a solution how to fix it developer.android.com/training/dependency-injection/hilt-jetpack#workmanager

[Tony Houghton](https://hashnode.com/@realh)

[Jun 22, 2022](https://hashnode.com/posts/how-to-implement-hilt-in-android-app/61fdc484fd8b083e5728ba29/comment/62b33b76b8204992cc91d16a)

My app didn't already have an Application, and this is the only article I could find on what to do about that. But what should I put in the class body? Is it OK to leave it blank?

[Vincent Tsen](https://hashnode.com/@vtsen)

[Jun 22, 2022](https://hashnode.com/posts/how-to-implement-hilt-in-android-app/61fdc484fd8b083e5728ba29/comment/62b33b76b8204992cc91d16a#reply-62b3903586d22092a754731b)

Yes, you can leave it blank. That should be fine. :)
