I give App class name to android:name, but it is n...
# android
y
I give App class name to android:name, but it is not working
b
What error shows to you?
Do you have a print of this error or something like that?
y
Class name is gray color
So it shows "Class 'DemoApp' is never used" if I take the mouse pointer over it
b
But when you try to run, it's not calling that application onCreate?
y
Yes
It is not called
b
Ohh that's weird, are you declared all your activities inside application tag in manifest?
and maybe it can be a problem with a lot of external dependencies in your project
j
Tried to replicate your issue, it does as you say. But seems normal to me, it'll be out of the gray when you actually use it for running application level functions written in the DemoApp class. :)
v
have you tried the full qualified class name? like
.global.DemoApp
or
.somepackage.DemoApp
. Just noticied the
.
before
DemoApp
and maybe your application class is not in the root package
j
In the past, I tend to place the custom Application class in the root package, now I place it in a folder along with other application-wide stuff. The behavior remains the same for me 🤔