Android培训(day1)
1. 1-4G


2.系统的由来!





3.Dalvik VM和JVM



4.学习Android方法
看谷歌官方文档Api Guides
原因1: 学习技术看老祖宗,源头其他的书籍都是来自源头
原因2:锻炼自己啃官方文档的English能力,一旦炼成后续学其他技术不在话下.
5.小工具

AndroidStudio——tools——AVD Manager 模拟器
AndroidStudio——tools——SDK Manager SDK管理器
AndroidStudio——view——tool windows——Device File Explorer


(DDMS: 调试监控服务平台)
DDMS——File Explorer——data——app 应用apk
DDMS——File Explorer——data——data 应用包名列表
Emulator control——模拟xx给你模拟器: 发短信/打电话
6.项目结构

包名组成: com.公司名.项目名
最低版本
目标版本
编译版本
工程目录结构:
四大组件必须在清单文件进行配置,才能使用.
6.程序打包与安装过程

7.ADB指令
为了能在任意目录使用 adb 命令,需要将 SDK 目录下的 platform-tools 文件夹路径和 tools 文件夹路径配置到 path 环境变量中
adb:android debug briage,android 调试桥
列出可以使用的 android 版本
- android list targets
列出可以使用的模拟器 - android list avd
创建模拟器 - android create avd –n <模拟器名> -t <Target 版本 ID> -c <SD 卡大小> -s < 屏幕尺寸>
启动模拟器 - emulator –avd <模拟器名>
显示已连接的设备 - adb devices 显示内容:设备名,状态(device、offline) 导入文件到手机
- adb push <Windows 源文件路径> <手机目标路径> 推:把电脑上的文件推送到模拟器里
从手机导出文件 - adb pull <手机源文件路径> <Windows 目录路径> 拉:把模拟器中的文件拉到电脑
安装程序 - adb install <apk 文件路径>
卸载程序 - adb uninstall <包名>
卸载应用程序,如果执行此目录时,有两个设备同处于 device 状态,那么卸载时 就要指定卸载哪一个设备上的应用程序:adb -s 设备名称 uninstall xxx.apk 重启 adb -
adb kill-server abd start-server Adb shell
来到模拟器 linux 系统的终端里,列出模拟器的目录结构:与 DDMS 中 File Explorer 界面显示的目录结构一样
ps:运行的进程
kill -9 pid:杀死进程
8.UI绘制相关

- 按钮有4种添加点击时间的方式:xml、implement、onclick
- 有5大布局
- 单位只用两种:
-- dp : 屏幕控件大小使用
-- sp : 文字大小使用
今日总结:

[4].Android系统架构
[5].jvm&dvm
[6].打包流程
编译——class——dex文件——打包(aapt)生成一个apk文件——adb(调试器)——device
[7].adb常见指令
[8].电话拨号器:意图对象Intent
[9].按钮的四种点击事件
[10].五大布局
[11].单位dp和sp