admin管理员组文章数量:1568355
文章目录
- 一,环境搭建
- 1)Java环境(JDK)
- 2)Eclipse 开发工具
- 3)Android SDK
- 二,SDK和AVD的配置
- 1)SDK和AVD
- 2)Android SDK Manager下载项
- 3)AVD Manager 配置项
- 4)AVD模拟器启动报错
- 1,和Hyper-V 虚拟机冲突了:
- 2,Intel HAXM 没装:
- 3,修改AVD保存虚拟机的路径:
- 4,启动之后黑屏:
《精通移动App测试实战:技术、工具和案例》中使用 Eclipse 开发 Android 程序的,其实有专门的集成版本开发工具 Android Studio 。也跟着搭个。
一,环境搭建
Win10中搭建 Android 开发环境需要搭建的内容有:
1)Java环境(JDK)
https://blog.csdn/paidaxing_dashu/article/details/88950251
2)Eclipse 开发工具
https://blog.csdn/paidaxing_dashu/article/details/88950085
3)Android SDK
SDK安装的时候千万不要放到C盘,不然轮旋爆满!!!!
Android SDK是Google提供的Android开发工具包,在我们开发Android 应用的时候,需要通过引入其工具包来使用Aandroid相关的API。
https://wwwblogs/summary-2017/p/8073225.html
二,SDK和AVD的配置
1)SDK和AVD
SDK安装的时候千万不要放到C盘,不然轮旋爆满!!!!
SDK和AVD就是下载的Android-Sdk中的这两个:
SDK
AVD
打开这两个界面的方式有很多,在之前配置好了Eclipse和ADT之后,在Eclipse中的两种打开位置:
1,Win(窗口)打开下方
2,图标所示
2)Android SDK Manager下载项
看上去很多很多的可下载项,而且占空间都不小,全部收缩起来,
这个大佬的图就很奈斯,小老弟看了根本把持不住:https://blog.csdn/kuangshow0227/article/details/73195037
Tools中:
下载这三个就够了,Build-tools构建文件,看大佬们都说下载一个最新的就行。
API类库:
中间这个一大排的Android类库就是选择性下载了,需要什么版本的就下载什么版本的。重点是版本里的选项:
Extras:
看不少大佬说这里的好东西还是比较多的,但是刚开始还是下载几个够用了
3)AVD Manager 配置项
偷看大佬的,小老弟贼嗨:https://wwwblogs/sheseido/p/9368761.html
启动时间可能会比较长一点:
4)AVD模拟器启动报错
1,和Hyper-V 虚拟机冲突了:
报错代码段,如下,要是中间有 Hyper-V 字样,就试试先把Hyper-V 给关闭了。
Starting emulator for AVD 'Galaxy_Nexus_6.0'
emulator: ERROR: x86 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: Please disable Hyper-V before using the Android Emulator. Start a command prompt as Administrator, run 'bcdedit /set hypervisorlaunchtype off', reboot.
关闭Hyper-V 操作步骤:
1,打开控制面板
2,依次点击,程序---->程序和功能—启动或关闭功能,把Hyper-V,取消选中,然后等待重启
3,管理员身份命令行运行命令 bcdedit /set hypervisorlaunchtype off
2,Intel HAXM 没装:
Starting emulator for AVD 'test'
emulator: WARNING: Crash service did not start
ERROR: resizing partition e2fsck failed with exit code 8
emulator: WARNING: userdata partition is resized from 1 M to 200 M
emulator: ERROR: x86_64 emulation currently requires hardware acceleration!
Please ensure Intel HAXM is properly installed and usable.
CPU acceleration status: HAXM is not installed on this machine
这个报错就是,我们在Extras中下载的这货没安装,虚拟器启动不了
在这个文件夹位置,点击安装一下就行:
3,修改AVD保存虚拟机的路径:
就是新建一个变量 ANDROID_SDK_HOME ,路径就是我们想要保存到的地方
4,启动之后黑屏:
一般修改一下分辨率
报错代码:
Starting emulator for AVD 'Nexus_5_10'
Creating filesystem with parameters:
ERROR: resizing partition e2fsck failed with exit code 8
Size: 69206016
Block size: 4096
Blocks per group: 32768
Inodes per group: 4224
Inode size: 256
Journal blocks: 1024
Label:
Blocks: 16896
Block groups: 1
Reserved block group size: 7
Created filesystem with 11/4224 inodes and 1302/16896 blocks
Hax is enabled
Hax ram_size 0x40000000
HAX is working and emulator runs in fast virt mode.
audio: Failed to create voice `goldfish_audio_in'
qemu-system-x86_64.exe: warning: opening audio input failed
emulator: Listening for console connections on port: 5554
emulator: Serial number of this emulator (for ADB): emulator-5554
qemu-system-x86_64.exe: goldfish_battery_read: Bad offset 000000000000001c
qemu-system-x86_64.exe: goldfish_battery_read: Bad offset 0000000000000020
qemu-system-x86_64.exe: goldfish_battery_read: Bad offset 0000000000000024
qemu-system-x86_64.exe: goldfish_battery_read: Bad offset 0000000000000028
qemu-system-x86_64.exe: goldfish_battery_read: Bad offset 000000000000002c
版权声明:本文标题:《精通引动APP测试实战:技术、工具和案例》---Android 开发环境搭建 内容由热心网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:https://www.elefans.com/dianzi/1727613606a1123010.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论