美文网首页
Ai-笔记:10分钟打造流畅安卓模拟器VirtualBox,Ge

Ai-笔记:10分钟打造流畅安卓模拟器VirtualBox,Ge

作者: 威玲旺卡 | 来源:发表于2017-11-08 09:30 被阅读0次

    0.安装

    可以在10分钟内解决
    安装的顺序,VirtualBoxGenymotionAndroid Studio
    VirtualBox的安装,sudo apt-get install virtualbox
    Genymotion的安装,下载https://www.genymotion.com/fun-zonechmod +x,运行bin文件,调用./genymotion
    Android Studio的安装,下载zip,解压,进bin目录,执行./studio.sh,然后安装Genymotion插件。

    To install the Genymotion plugin for Android Studio
    In Android Studio, go to File/Settings (for Windows and Linux) or to Android Studio/Preferences (for Mac OS X)
    Select Plugins and click Browse Repositories.
    Right-click on Genymotion and click Download and install. To see Genymotion plugin icon, display the toolbar by clicking >View > Toolbar.
    source: https://www.genymotion.com/plugins/

    1.配置

    Genymotion中添加模拟器,如果运行过程中出现

    CPU数量错误.png 说明我们要用单CPU来模拟多CPU,Intel VT硬件虚拟加速技术就在这里用得上了。
    当然,我们也可以不用Intel VT,方法是,在Virtualbox中把模拟器的CPU数改成1,单核运行,把内存改成1024MB,在Setting-System-Acceleration中把Enable VT-x给勾去。可以想象,模拟器将会非常慢。
    所以为了打造流畅的模拟器,需要重启我们的实体计算机(不是模拟器),在BIOS中将Intel Visualization Technologyenable
    不用修改Setting就完成了。

    IP地址分配错误.png 解决方法是,在VirtualboxSetting-Network-Adapter1-Promiscuous Mode中将下拉框从Deny选到Allow VMS

    VirtualBox无法运行错误.jpg 首先遇上这个问题要看看你的VirtualBox是不是打开了Setting,如果是,退出Setting就好了。否则,其实它也会是问题1的CPU提示错误的连带报错,解决方法如配置问题1。

    2.未解决问题

    一些app会在Genymotion中出现明明版本兼容却提示不兼容而出现不能安装的问题。比如说微信。一种可能是需要arm translator,需要对应google playgapps,还有一种可能是微信做了反模拟器检测。我并不知也没深入研究。但是解决方法很简单,下载 Genymotion-ARM-Translation_v1.1.zip 拖拽到模拟器里再执行重启就可以了。包括对应版本地gapps,都是flashable的。

    3.测试

    Android Studio越来越好用,没什么可以抱怨的,下载demo sample
    EclipseGenymotion的插件不一样的是,没有办法从Android Studio中启动Genymotionrun“app”前我们必须手动运行打开Genymotion并运行好模拟器。

    测试截图.png

    完成了,开始写你的安卓程序吧。

    相关文章

      网友评论

          本文标题:Ai-笔记:10分钟打造流畅安卓模拟器VirtualBox,Ge

          本文链接:https://www.haomeiwen.com/subject/ltqemxtx.html