它们有什么区别?
一个是应用程序的java入口?
一个是应用程序的android应用入口?
那么一个app启动加载的第一类就是ActivityThread吗?
关于这种问题,我应该怎么样自己测试得到结果呢?(而不是一有问题就到网站求助?)
黄舟2017-04-18 09:06:29
Now that you have said that, I recommend you a website called Baidu. There is a box in the middle of the website. If you don’t understand anything, enter it first and click "Baidu" on the right.
高洛峰2017-04-18 09:06:29
The main method of Activitythread is the real entrance. He managed the creation of the four major components of Android
阿神2017-04-18 09:06:29
The entrance to the Android application is defined in AndroidManifest.xml.
As shown below:
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
PHP中文网2017-04-18 09:06:29
Because ActivityThread
belongs to the framework source code, so if you want to verify it by logging, it is impossible.
You can only look for clues from ActivityThread
的main
方法中去寻找线索,看看里面是如何进入Application
的onCreate
's main
method to see how it enters the onCreate
function of Application