开发前的准备:
1.配置java环境
2.下载安装jdk、下载sdk
3.下载开发工具:android studio 、eclipse
4.项目运行设备:模拟器、手机、平板电脑
5.Android基本常识:比如:四大组件的了解等…自行补脑!
开发场景:
1.新建项目启动流程
2.项目维护常用步骤
android studio 项目结构 :
<img src=http://thyrsi.com/t6/377/1538203420x-1404781090.png />
eclipse 项目结构:
<img src=http://thyrsi.com/t6/377/1538203534x-1404781090.png />
项目的启动流程:
项目的启动流程:
1.1、程序入口:AndroidManifest.xml
<img src=http://thyrsi.com/t6/377/1538203757x-1404795864.png />
1.2、activity 生命周期:
<img src=http://thyrsi.com/t6/377/1538203804x-1404795864.png />
1.3、项目模块优先调用函数:
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.main_activity);
//逻辑加载处理
}
2.1、debug 调试模式开启:
<img src=http://thyrsi.com/t6/377/1538204316x-1404795654.png />
2.2、断点设置进行代码跟踪
2.3、打log日志代码跟踪
Android框架架构图:
<img src=http://thyrsi.com/t6/377/1538204513x-1404781126.png />
Linux内核启动之后就到Android Init进程,进而启动Android相关的服务和应用。
Android Init启动的过程如下图所示:
<img src=http://thyrsi.com/t6/377/1538204947x-1404758455.png />
系统启动过程如下:
<img src=http://thyrsi.com/t6/377/1538205062x-1404795654.png />