哪里是官方的Android模拟器位于Ubuntu的? (从Android工作室独立执行的话) [英] Where is the official Android emulator located in Ubuntu? (To execute it independently from Android Studio)
问题描述
请,纠正我,如果我错了。
Android的工作室之前,大多数人使用的Android SDK中。安装它并将其添加到PATH后 android_folder / SDK
和 android_folder /平台的工具
,我们可以从终端执行
的Android AVD
在默认平台是现在Android的工作室。我曾尝试以下内容:
-
查找在Android Studio文件夹内的AVD命名的文件。我还没有找到它。
-
下载 SDK工具只有,但似乎它未包含名为AVD无论是任何文件。
我使用的OpenJDK。我在Ubuntu 14.04LTS。我已经加入Android Studio中的路径:出口PATH = $ PATH:〜/ location_of_android工作室/斌
。我已经加入了OpenJDK的路径也:出口JAVA_HOME = / usr / lib目录/ JVM / Java的7-的OpenJDK-AMD64
和出口PATH = $ PATH:$ JAVA_HOME /斌
如果I型:的Android AVD
,它返回:的android:命令未找到的
您必须通过下载Android的SDK(有或没有工作室),如果你用科尔多瓦创建的应用程序可以运行的官方模拟器
科尔多瓦模仿机器人
或
离子运行-l
在-l会自动刷新,当你改变了code仿真
或
纹波效仿-p 1234
所有这些选项需要安装NPM。
一旦你已经安装了故宫,安装运行科尔多瓦'须藤NPM安装-g科尔多瓦离子纹波
sudo的附加的apt-库PPA:克里斯 - LEA /的node.jssudo易于得到更新命令和apt-get安装的NodeJS须藤NPM安装NPM -g
建议把SDK在/ usr /本地,以便所有用户都可以访问它,我没有安装Studio IDE中,并把它在该位置造成所有权permisssions问题和AVD的默认根/ .android / AVD folde
我为SDK安装位置是USR /本地/ Android的SDK-linux下这是根本的个人资料,所以我只是允许任何人运行/写入此目录CHMOD -R 777 USR /本地/ Android的SDK-Linux下
这未必是推荐的选项,我现在有这个问题未在我的本地.android / AVD文件夹中创建的设备定义(INI),因为它有使用sudo权限运行更新,但随后是在本地寻找设备定义,当您使用科尔多瓦/离子,因为这些被本地用户不是sudo的用户(须藤/用户/本地/ Android的SDK-Linux的/工具/ Android的AVD)
另外一种选择是安装它在我自己的家/康纳尔目录,然后在.profile文件设置ANDRIOD_HOME路径变量像下面
出口ANDROID_HOME = /家庭/康纳尔/ Android的SDK-Linux的/
出口PATH = $ PATH:$ ANDROID_HOME /工具:$ ANDROID_HOME /平台的工具
创建的AVD的由的Android AVD
命令现在在/home/conor/.android/avd文件夹中创建。
Please, correct me if I'm wrong.
Before Android Studio, most people used the Android SDK. After installing it and adding it to the PATH android_folder/sdk
and android_folder/platform-tools
, we could execute from terminal:
android avd
As the default platform now is Android Studio. I have tried the following:
Find a file named avd within the Android Studio folder. I have not find it.
Download the SDK Tools Only, but it seems it does not include any file named avd either.
I'm using OpenJDK. I'm on Ubuntu 14.04LTS. I have added Android Studio to the path: export PATH=$PATH:~/location_of_android-studio/bin
. I have added OpenJDK to the path too: export JAVA_HOME=/usr/lib/jvm/java-7-openjdk-amd64
and export PATH=$PATH:$JAVA_HOME/bin
.
If I type: android avd
, it returns: android: command not found
you have the official emulator by downloading the android-sdk (with or without the studio), if your using cordova to create your app you can run
cordova emulate android
or
ionic run -l
the -l automatically refreshes the emulation when you change the code
or
ripple emulate -p 1234
all of these options require npm to be installed.
once you have npm installed, to install cordova run 'sudo npm install -g cordova ionic ripple'
sudo add-apt-repository ppa:chris-lea/node.js
sudo apt-get update
sudo apt-get install nodejs
sudo npm install npm -g
It is recommended to put the sdk in /usr/local so all users can access it, I did not install the studio IDE and putting it in that location caused ownership permisssions problems and the AVD's default to the root/.android/avd folde
my install location for the sdk is usr/local/android-sdk-linux which is under the root profile so I just allowed anyone to run/write to this directory chmod -R 777 usr/local/android-sdk-linux
this may not be the recommended option and I now have the problem that the device definitions (ini) are not being created in my local .android/avd folder because it has to be run with sudo permissions to update but it then is looking locally for the device definitions when you use cordova/ionic to start the emulation because these are being run under the local user not the sudo user (sudo /user/local/android-sdk-linux/tools/android avd)
The other option is to install it in my own home/conor directory and then set the ANDRIOD_HOME path variable like below in .profile
export ANDROID_HOME=/home/conor/android-sdk-linux/
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
The created AVD's by android avd
command are now created in /home/conor/.android/avd folder.
这篇关于哪里是官方的Android模拟器位于Ubuntu的? (从Android工作室独立执行的话)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!