简体   繁体   English

卡利Linux 32位上的android-studio

[英]android-studio on kali linux 32 bit

Problem report 问题报告

I have installed android studio 2.3.1 on Linux 32 bit machine (Kali Linux). 我已经在Linux 32位计算机(Kali Linux)上安装了android studio 2.3.1。 It is successfully installed. 已成功安装。 Then after I've tried to create an application the following errors happened. 然后,在尝试创建应用程序之后,发生了以下错误。

  1. When I run an application on the external device, it will generate the following error: 当我在外部设备上运行应用程序时,它将生成以下错误:

Error message: 错误信息:

Unable to detect adb version, adb output: /home/elsi/Android/Sdk/platform-tools/adb: 1: /home/elsi/Android/Sdk/platform-tools/adb: Syntax error: ")" unexpected 无法检测到ADB版本,ADB输出:/ home / elsi / Android / SDK / platform-tools / adb:1:/ home / elsi / Android / Sdk / platform-tools / adb:语法错误:“)”意外

I tried the following solution on the terminal 我在终端上尝试了以下解决方案

elsi@kali-Rolling:~/Android/Sdk/platform-tools$ adb kill-server

elsi@kali-Rolling:~/Android/Sdk/platform-tools$ adb start-server
  • daemon not running. 守护程序未运行。 starting it now on port 5037 * 现在在端口5037上启动它*

  • daemon started successfully * 守护程序成功启动*

elsi@kali-Rolling:~/Android/Sdk/platform-tools$ adb devices

List of devices attached 连接的设备列表

793532E2034CF208 device 793532E2034CF208设备

The following are the latest android sdk and gradle version, I am currently using 以下是我目前正在使用的最新android sdk和gradle版本

  compileSdkVersion 25

buildToolsVersion "25.0.3"

Still, the problem is not fixed. 尽管如此,问题仍未解决。

  1. When I create a virtual device(emulator) to run the program, it also generates an error says HAXM require genuine Intel processor. 当我创建一个虚拟设备(仿真器)运行该程序时,它还会产生一个错误,提示HAXM需要正版Intel处理器。 I tried to search some solution on the Internet, but Kali Linux does not support this processor, therefore, I installed KVM, and other required packages still not yet supported. 我尝试在Internet上搜索一些解决方案,但是Kali Linux不支持该处理器,因此,我安装了KVM,并且仍不支持其他必需的软件包。 Error message: 错误信息:

    在此处输入图片说明

first, 第一,
Verify that the machine you are running on has an Intel processor. 验证您所运行的计算机上是否装有Intel处理器。 If it's not an Intel processor then try to check what version your kali is: 32bit/64bit. 如果不是Intel处理器,请尝试检查kali的版本:32bit / 64bit。

usually The following platforms are supported by the Intel HAXM: 通常,英特尔HAXM支持以下平台:

Windows 8 and 8.1 (32/64-bit), Windows 7 (32/64-bit), Windows Vista* (32/64-bit) Windows 8和8.1(32/64位),Windows 7(32/64位),Windows Vista *(32/64位)

Mac OS X* 10.6 (32/64-bit) or 10.7 (32/64-bit) or 10.8 (64-bit) or 10.9 (64-bit) Mac OS X * 10.6(32/64位)或10.7(32/64位)或10.8(64位)或10.9(64位)

Ubuntu (64-bit) Ubuntu(64位)

refer to Link 参考链接

second, try to use arm images for Emulator. 其次,尝试将手臂图像用于Emulator。 You can find this in Other Images tab at the time of emulator creation. 创建模拟器时,您可以在“其他图像”选项卡中找到它。

third, Check if your CPU supports hardware virtualization, by typing: 第三,通过键入以下命令检查您的CPU是否支持硬件虚拟化:

egrep -c '(vmx|svm)' /proc/cpuinfo

If the result is 0, your CPU does not support hardware virtualization, which is necessary to run the KVM. 如果结果为0,则您的CPU不支持硬件虚拟化,这是运行KVM所必需的。 If you get 1 or more, that means you're fine. 如果您获得1或更多,则表示您还可以。

Next, install KVM. 接下来,安装KVM。 First make sure if your processor supports KVM by typing: 首先,通过键入以下命令来确保您的处理器是否支持KVM:

kvm-ok

You will see this if that's the case: 如果是这种情况,您将看到以下内容:

INFO: Your CPU supports KVM extensions INFO: /dev/kvm exists KVM acceleration can be used If this is the result, you need to turn on Intel VT in BIOS: 信息:您的CPU支持KVM扩展信息:/ dev / kvm存在可以使用KVM加速如果结果是这样,则需要在BIOS中打开Intel VT:

INFO: KVM is disabled by your BIOS HINT: Enter your BIOS setup and enable Virtualization Technology (VT), and then hard poweroff/poweron your system KVM acceleration can NOT be used The next step is to install the KVM and a few other packages needed. 信息:KVM被您的BIOS禁用提示:输入您的BIOS设置并启用虚拟化技术(VT),然后硬关机/开机系统KVM加速将无法使用下一步是安装KVM和所需的其他一些软件包。 To do so, type: 为此,请键入:

sudo apt-get install qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils

Add your user to some groups, replacing by your own username: 将您的用户添加到某些组中,替换为您自己的用户名:

sudo adduser <user> libvirtd

sudo adduser <user> kvm

Check if everything is ok: 检查一切是否正常:

sudo virsh -c qemu:///system list

Try Again... 再试一次...

let me know if you got it work. 让我知道您是否可以使用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM