Add a Lint check for not calling super.onCreate
See original GitHub issueDoes Hilt currently not work with Services?
I have @AndroidEntryPoint
on the Service as well as the Activity/Fragment that starts it. I am trying to field-inject a lateinit var
but it stays uninitialized. I heard from a friend that he had the same problem.
Issue Analytics
- State:
- Created 3 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Improve your code with lint checks - Android Developers
Configuring lint checking in Java or Kotlin The following example shows how you can turn off lint checking for the NewApi issue in...
Read more >Why do we have to call super in Android sometimes?
This depends on the base class implementation. Most of the time, Android checks to see that the superclass method was called with a...
Read more >new Lint check: calling the same super function more than ...
If you call `super.onCreate` more than once, things will break. Lint should catch this. Comments.
Read more >Why do you need Lint in Android - Nyame Bismark - Medium
Add a list of issues you want lint tool to check. The lint.xml file consists of an enclosing <lint> parent tag that contains...
Read more >Improving Your Code with lint | Android Developers
To disable lint checking specifically for a Java class or method in your Android project, add the @SuppressLint annotation to that Java code....
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
@ZacSweers The issue is that because of the way the plugin works with last second substituting the base class via bytecode transformation, the base class at compile time is not the class that has the
@CallSuper
annotation on it.Thanks, we add
@CallSuper
to the generated base class but that doesn’t do anything when you use the plugin.I think we’ll probably want to add our own lint check for this.