【android】 android studio使用
来源:互联网 发布:三棱手刺淘宝可以卖吗 编辑:程序博客网 时间:2024/06/09 18:00
1.下载
百度搜索,百度会直接给出下载链接。
2.配套工具
androidSDK。是一个压缩包,解压后得到目录xxx。在studio中设置sdk目录=此目录xxx即可。注意绝对路径中不能含有空格。
3.avd调试
avd,android virtual device,安卓虚拟设备。
3.1常见错误
avd启动时有时会报错,硬件加速器不能用等。
答:需要下载一个驱动程序,名字与路径是这样的:android-sdk-windows\extras\intel\Hardware_Accelerated_Execution_Manager。安装过程中可能会有提示,还需要在BIOS上打开VT-X开关。
安装程序到avd,提示 INSTALL_FAILED_NO_MATCHING_ABIS。
答:有些特性avd或电脑的cpu不支持,建议用真机。
4.工程管理
界面见图4-1.
图4-1 studio 界面示例
4.1添加移除模块
选中任意模块右击,选择open module settings。
4.2添加本地lib依赖
图4-2 手动创建目录并拷贝jar包
选中添加的jar,添加到依赖。然后build.gradle会自动更新。
图 4-3 build.gradle会自动更新
5.真机调试
5.1真机运行
首先将手机与电脑用usb相连,并打开usb调试模式。选中项目,点击run,会有下图5-1让你选。
图5-1 Device Chooser
如何打开?
进入设置 | 关于手机 |,连续点击‘版本号’一栏七次,再返回设置界面便可看到开发者选项。进入开发者选项,可看到相应的开关。
5.2真机断点调试
点击'Run' 箭头右边的'Debug'图标,就可以选择真机调试。设置断点的方法与eclipse IDE相近。调试界面见图5-2
图 5-2 debug断点的界面
0 0
- 【android】 android studio使用
- <Android Studio> Android Studio 使用Aliyun Maven
- #android#android studio 使用cardview
- android studio使用教程
- Android Studio使用教程
- Android Studio使用教程
- Android Studio使用教程
- android studio 使用
- Android Studio使用大全
- Android Studio使用教程
- Android studio 使用问题
- Android Studio使用教程
- Android Studio使用问题
- Android Studio使用教程
- Android Studio使用
- Android Studio使用教程
- Android studio使用教程
- Android Studio使用教程
- AJax的全接触
- VC++串口
- 49. Group Anagrams
- StringBuffer
- 选择排序
- 【android】 android studio使用
- lintcode:Heapify
- springside 推荐的编程
- 怎么让网站在浏览器网址前面显示小图标?
- 弹出框,有两个,自定义一个view和系统的
- Python and Matlab绘制曲线图
- 大数加法、减法、乘法、除法实现
- [Java]path与classpath
- 颜色资源