ubuntu安装安卓模拟器

前言

最近由于工作原因笔记本安装成Ubuntu系统,而安装ubuntu之后找了很多看电视的方法,要么就是太繁琐,要么就是需要直播源,所以最后还是寄希望于安卓模拟器。网上翻了很多资料最后决定使用genymotion,下面简单记录一下,分享给有需要的同仁。

一、安装virtualbox

示例:pandas 是基于NumPy 的一种工具,该工具是为了解决数据分析任务而创建的。

sudo apt install virtualbox

二、安装genymotion

1.下载

官网:www.genymotion.com/download/

wget https://dl.genymotion.com/releases/genymotion-3.3.1/genymotion-3.3.1-linux_x64.bin

2.安装

赋可执行权限再安装:

sudo chmod u+x genymotion-3.2.1-linux_x64.bin
sudo ./genymotion-3.3.1-linux_x64.bin
Installing for all users.
Installing to folder [/opt/genymobile/genymotion]. Are you sure [y/n] ? y
- Extracting files ..................................... OK (Extract into: [/opt/genymobile/genymotion])
- Installing launcher icon ............................. OK
Installation done successfully.
You can now use these tools from [/opt/genymobile/genymotion]:
- genymotion
- genymotion-shell
- gmtool

3.登录

安装之后,点击genymotion图标打开即可,需要注册登录帐号,选个人使用,添加虚拟设备。

image.png

4. 网络设置

5. 安卓APP报错

报错问题:

使用Genymotion 安装APP报错:An error occured while deploying the file. This probably means that the app contains ARM native code and your Genymotion device cannot run ARM instructions. You should either build your native code to x86 or install an ARM translation tool in your device.

解决方法:

产生场景
电脑上安装Genymotion后,使用Genymotion安装安卓app,产生 An error occured while deploying the file. This probably means that the app contains ARM native code and your Genymotion device cannot run ARM instructions. You should either build your native code to x86 or install an ARM translation tool in your device.的报错

产生原因
Genymotion模拟器使用的是x86架构,在第三方市场上的应用有部分不采用x86这么一种架构,所以在编译的时候不通过,报“APP not installed”,可以下载Genymotion提供的ARM转换工具包,将应用市场中的ARM架构的apk转换成Genymotion可以编译的x86架构;

解决方案
下载Genymotion-ARM-Translation-Librarities工具转换包;下载路径:pan.baidu.com/s/1kUAftyR 。将下载好的工具包直接拖拽到Genymotion中,然后提示重启模拟器;

可是当使用Safari下载完成拖入后,并没有提示重启,于是我把这个文件压缩成zip文件重新拖入,可以是还是没有重启。于是猜测到应该是 原有的格式内容已经改变了,于是使用谷歌浏览下载该文件不会被解压,拖入后也是重启了。如果你没有谷歌浏览器则可以到 Safari -> 偏好设置 -> 通用 -> 最下方(下载后打开"安全的"文件的勾去掉),如下图:

image.png

学习更多ubuntu安装以及安卓模拟器知识,请关注CRMEB