Is there a function in Android analogous to “int main” in C/C++ which contains the program's main loop?

前端 未结 4 1489
日久生厌
日久生厌 2020-12-08 23:04

Normally in a C or C++ program there\'s a main loop/function, usually int main (). Is there a similar function that I can use in android Java development?

4条回答
  •  谎友^
    谎友^ (楼主)
    2020-12-09 00:08

    In Android environment, there is no main(). The OS relies on the manifest file to find out the entry point, an activity in most case, into your application.

    You should read http://developer.android.com/guide/topics/fundamentals.html for more detail.

提交回复
热议问题