android - ActivityThread的main() 和Application的onCreate() 都是应用的入口?
大家讲道理
大家讲道理 2017-04-18 09:04:29
0
5
575

它们有什么区别?

一个是应用程序的java入口?
一个是应用程序的android应用入口?

那么一个app启动加载的第一类就是ActivityThread吗?
关于这种问题,我应该怎么样自己测试得到结果呢?(而不是一有问题就到网站求助?)

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

reply all(5)
黄舟

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.

伊谢尔伦

A process should have only one entry main function

小葫芦

The main method of Activitythread is the real entrance. He managed the creation of the four major components of Android

阿神

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>
洪涛

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 ActivityThreadmain方法中去寻找线索,看看里面是如何进入ApplicationonCreate's main method to see how it enters the onCreate function of Application

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template