question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hilt: Native function causing build fail: codeAttr must not be null

See original GitHub issue

Similar to #1955 having a native function inside a class marked with @AndroidEntryPoint causes the build to fail with the same error message mentioned in that issue.

Execution failed for task ':app:transformClassesWithAndroidEntryPointTransformForDebug'.
> codeAttr must not be null

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

2reactions
xmynocommented, Sep 10, 2020

I can confirm that the error no longer occurs for me with version 2.29-alpha.

1reaction
danysantiagocommented, Aug 26, 2020

This is already fixed by https://github.com/google/dagger/commit/2099bade9a2d9ba0fd9fc9b8a31006ed7b13cf41, the next released version of Hilt will contain this fix. As workaround for now, you can move your native method from the @AndroidEntryPoint-annotated class.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dagger-hilt error while compiling project - Stack Overflow
I recommend using the latest stable version of Dagger. Mine is working with these versions:
Read more >
Hold on Before you Dagger or Hilt! try this Simple DI.
Learn Pure Native Kotlin DI, which can be migrated to HILT or Dagger ... with some hilt scoped annotation you can do no-brainer...
Read more >
View model has no zero arg constructor when using ...
When creating a view model using the navigation scope i get an error stating that ViewModel has no zero argument constructor.
Read more >
How to use Hilt with Room Database ( Complete guide - Part 2)
In the previous video, I mentioned the fundamentals of the Hilt. In this article, I will teach you how to use Hilt in...
Read more >
HILT Constructor Injection Problems - YouTube
The best android courses in the world: https://codingwithmitch.com/Watch the HILT course here (FREE): ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found