android-activity

Android Activity::onCreate called before Application.onCreate

不问归期 提交于 2020-12-15 05:23:15
问题 In some cases I can see that Activity.onCreate is called before the Appication object gets created (before Application.onCreate is called). Is that ever possible? 回答1: May be you forgot to add your application class in manifest file. Place your application class in AndroidManifest.xml class under <application> tag. i.e., <application android:name=".{YourApplicationClassName}" ... ... 回答2: In some cases I can see that Activity.onCreate is called before the Appication object gets created

Android Activity::onCreate called before Application.onCreate

こ雲淡風輕ζ 提交于 2020-12-15 05:23:08
问题 In some cases I can see that Activity.onCreate is called before the Appication object gets created (before Application.onCreate is called). Is that ever possible? 回答1: May be you forgot to add your application class in manifest file. Place your application class in AndroidManifest.xml class under <application> tag. i.e., <application android:name=".{YourApplicationClassName}" ... ... 回答2: In some cases I can see that Activity.onCreate is called before the Appication object gets created