JDK Android_SDK Android_Studio Genymotion VirtualBox搭建安卓开发环境

8人阅读 评论(0) 收藏 举报




(一)JDK安装和配置
(二)Android SDK安装和配置
(三)Android Studio安装和配置
(四)genymotion安装和配置
(五)virtualbox安装和配置

#####################################################
在/hime/Softwares下新建Android_SDK  Android_Studio  Genymotion  JDK  VirtualBox文件夹
[xhh@localhost ~]$ su
Password:
[root@localhost xhh]# pwd
/home/xhh
[root@localhost xhh]# cd /home
[root@localhost home]# dir
xhh
[root@localhost home]# mkdir Softwares
[root@localhost home]# cd Softwares
[root@localhost Softwares]# mkdir JDK Android_SDK Android_Studio Genymotion VirtualBox
[root@localhost Softwares]# dir
Android_SDK  Android_Studio  Genymotion  JDK  VirtualBox
[root@localhost Softwares]#

#####################################################
[xhh@localhost Downloads]$ su
Password:
[root@localhost Downloads]# dir
android-sdk_r24.4.1-linux.tgz
android-studio-ide-171.4443003-linux.zip
genymotion-2.12.0-linux_x64.bin
jdk-8u161-linux-x64.tar.gz
VirtualBox-5.1-5.1.30_118389_el7-1.x86_64.rpm
[root@localhost Downloads]# mv jdk-8u161-linux-x64.tar.gz /home/Softwares/JDK
[root@localhost Downloads]# mv android-sdk_r24.4.1-linux.tgz /home/Softwares/Android_SDK
[root@localhost Downloads]# mv android-studio-ide-171.4443003-linux.zip /home/Softwares/Android_Studio
[root@localhost Downloads]# mv genymotion-2.12.0-linux_x64.bin /home/Softwares/Genymotion
[root@localhost Downloads]# mv VirtualBox-5.1-5.1.30_118389_el7-1.x86_64.rpm /home/Softwares/VirtualBox

#####################################################
#####################################################
(一)JDK安装和配置
下载链接:http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html

[root@localhost Softwares]# cd JDK
[root@localhost JDK]# dir
jdk-8u161-linux-x64.tar.gz
[root@localhost JDK]# tar -xzvf jdk-8u161-linux-x64.tar.gz
[root@localhost JDK]# dir
jdk1.8.0_161  jdk-8u161-linux-x64.tar.gz
[root@localhost JDK]# cd jdk1.8.0_161
[root@localhost jdk1.8.0_161]# dir
bin       db        javafx-src.zip  lib      man      release  THIRDPARTYLICENSEREADME-JAVAFX.txt
COPYRIGHT  include  jre            LICENSE  README.html  src.zip  THIRDPARTYLICENSEREADME.txt
[root@localhost jdk1.8.0_161]# cd lib
[root@localhost lib]# dir
amd64        ct.sym    ir.idl           jconsole.jar  missioncontrol  packager.jar  tools.jar
ant-javafx.jar    dt.jar    javafx-mx.jar  jexec         orb.idl         sa-jdi.jar    visualvm
[root@localhost lib]# vim /etc/profile

export JAVA_HOME=/home/Softwares/JDK/jdk1.8.0_161
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar

[root@localhost lib]# source /etc/profile
[root@localhost lib]# java -version
openjdk version "1.8.0_131"
OpenJDK Runtime Environment (build 1.8.0_131-b12)
OpenJDK 64-Bit Server VM (build 25.131-b12, mixed mode)
[root@localhost lib]#

#####################################################
(二)Android SDK安装和配置
下载链接:http://tools.android-studio.org/index.php/sdk
[xhh@localhost Android_SDK]$ dir
android-sdk_r24.4.1-linux.tgz
[xhh@localhost Android_SDK]$ su
Password:
[root@localhost Android_SDK]# tar -xvf android-sdk_r24.4.1-linux.tgz
[root@localhost Android_SDK]# dir
android-sdk-linux  android-sdk_r24.4.1-linux.tgz
[root@localhost Android_SDK]# cd android-sdk-linux
[root@localhost android-sdk-linux]# dir
add-ons  platforms  SDK\ Readme.txt  tools
[root@localhost android-sdk-linux]# cd tools
[root@localhost tools]# dir
android  ddms          emulator64-ranchu-arm64   emulator-ranchu-arm64   lib       monkeyrunner  source.properties
ant     draw9patch      emulator64-ranchu-mips64  emulator-ranchu-mips64  lib64     NOTICE.txt    support
apps     emulator      emulator64-x86        emulator-x86        lint      proguard        templates
bin     emulator64-arm   emulator-arm            hierarchyviewer        mksdcard  qemu        traceview
bin64     emulator64-mips  emulator-mips            jobb            monitor   screenshot2   uiautomatorviewer
[root@localhost tools]# ./android
在android sdk manager中载Tools、API Extras等

[root@localhost tools]# vim /etc/profile

export ANDROID_HOME=/home/Softwares/Android_SDK/android-sdk-linux
export PATH=$PATH:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

[root@localhost tools]# source /etc/profile

#####################################################
(三)Android Studio安装和配置
下载链接:http://www.android-studio.org/

[root@localhost Android_Studio]# dir
android-studio-ide-171.4443003-linux.zip
[root@localhost Android_Studio]# unzip android-studio-ide-171.4443003-linux.zip
[root@localhost Android_Studio]# dir
android-studio    android-studio-ide-171.4443003-linux.zip
[root@localhost Android_Studio]# cd android-studio
[root@localhost android-studio]# dir
bin  build.txt    gradle    Install-Linux-tar.txt  jre  lib  license  LICENSE.txt  NOTICE.txt  plugins
[root@localhost android-studio]# cd bin
[root@localhost bin]# dir
appletviewer.policy  fsnotifier    idea.properties  lldb     printenv.py  studio64.vmoptions  studio.sh
format.sh         fsnotifier64  inspect.sh        log.xml  restart.py   studio.png          studio.vmoptions
[root@localhost bin]# ./studio.sh

#####################################################
(四)genymotion安装和配置
下载链接:https://www.genymotion.com/download/

[xhh@localhost Genymotion]$ su
Password:
[root@localhost Genymotion]# dir
genymotion-2.12.0-linux_x64.bin
[root@localhost Genymotion]# ./genymotion-2.12.0-linux_x64.bin
bash: ./genymotion-2.12.0-linux_x64.bin: Permission denied
[root@localhost Genymotion]# chmod +X genymotion-2.12.0-linux_x64.bin
[root@localhost Genymotion]# ./genymotion-2.12.0-linux_x64.bin
bash: ./genymotion-2.12.0-linux_x64.bin: Permission denied
[root@localhost Genymotion]# bash ./genymotion-2.12.0-linux_x64.bin
Installing for all users.

Installing to folder [/opt/genymobile/genymotion]. Are you sure [y/n] ? y


- Trying to find VirtualBox toolset .................... WARNING (Virtualbox was not found in you PATH. Please install it manually)
- 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

[root@localhost Genymotion]#

#####################################################
(五)virtualbox安装和配置
下载链接:https://www.virtualbox.org/wiki/Download_Old_Builds_5_1

[xhh@localhost VirtualBox]$ su
Password:
[root@localhost VirtualBox]# dir
VirtualBox-5.1-5.1.30_118389_el7-1.x86_64.rpm
[root@localhost VirtualBox]# rpm -ivh VirtualBox-5.1-5.1.30_118389_el7-1.x86_64.rpm
warning: VirtualBox-5.1-5.1.30_118389_el7-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY
error: Failed dependencies:
    libSDL-1.2.so.0()(64bit) is needed by VirtualBox-5.1-5.1.30_118389_el7-1.x86_64

[root@localhost VirtualBox]# yum search libSDL
Loaded plugins: fastestmirror, langpacks
Loading mirror speeds from cached hostfile
 * base: mirrors.cn99.com
 * extras: mirrors.aliyun.com
 * updates: mirrors.163.com
====================================================== Matched: libSDL =======================================================
SDL.i686 : A cross-platform multimedia library
SDL.x86_64 : A cross-platform multimedia library
SDL-devel.i686 : Files needed to develop Simple DirectMedia Layer applications
SDL-devel.x86_64 : Files needed to develop Simple DirectMedia Layer applications
SDL-static.i686 : Files needed to develop static Simple DirectMedia Layer applications
SDL-static.x86_64 : Files needed to develop static Simple DirectMedia Layer applications

[root@localhost VirtualBox]# yum install SDL-devel.x86_64
[root@localhost VirtualBox]# rpm -ivh VirtualBox-5.1-5.1.30_118389_el7-1.x86_64.rpm
warning: VirtualBox-5.1-5.1.30_118389_el7-1.x86_64.rpm: Header V4 DSA/SHA1 Signature, key ID 98ab5139: NOKEY
Preparing...                          ################################# [100%]
Updating / installing...
   1:VirtualBox-5.1-5.1.30_118389_el7-################################# [100%]

Creating group 'vboxusers'. VM users must be member of that group!


vboxdrv.sh: failed: Look at /var/log/vbox-install.log to find out what went wrong.
This system is not currently set up to build kernel modules (system extensions).
Running the following commands should set the system up correctly:

  yum install gcc make
  yum install kernel-devel-3.10.0-693.el7.x86_64
(The last command may fail if your system is not fully updated.)
  yum install kernel-devel

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.
[root@localhost VirtualBox]# yum install gcc make
[root@localhost VirtualBox]# yum install kernel-devel-3.10.0-693.el7.x86_64

[root@localhost VirtualBox]# /sbin/vboxconfig
vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: Starting VirtualBox services.
[root@localhost VirtualBox]# locate VirtualBox
[root@localhost VirtualBox]# find / -name VirtualBox
/home/Softwares/VirtualBox
find: ‘/run/user/1000/gvfs’: Permission denied
/usr/bin/VirtualBox
/usr/lib/virtualbox/VirtualBox
^Z
[1]+  Stopped                 find / -name VirtualBox
[root@localhost VirtualBox]# cd /usr/bin
[root@localhost bin]# ./VirtualBox














查看评论

Genymotion+VirtualBox (android虚拟机的使用)

以前使用android studio 和eclipse开发android,模拟器还行,最近使用vs2017通过xamarin.forms跨平台开发,模拟器慢的很,没有办法只能用genymotion,...
  • weixin_40132006
  • weixin_40132006
  • 2017-12-06 22:33:59
  • 225

Android开发环境搭建(Eclipse版本)

  • 2016年04月01日 15:34
  • 696KB
  • 下载

Android基础之——MacOSX下elipse开发环境的配置

前不久换了台macbook,然后自己就把开发环境给配好了,本来这事就这么过去了,今天有位博友留言让我写一篇关于配置的文章,考虑到这个东西确实以后可能还会用,那就写下来,分享给大家,正好自己也再次回顾一...
  • yanglfree
  • yanglfree
  • 2014-08-08 00:17:49
  • 1466

VirtualBox

  • 2018年02月27日 10:42
  • 115MB
  • 下载

手把手教你如何配置Android环境-(三)Genymotion模拟器

本系列博文一共分为3章节: 一:Java环境变量 http://blog.csdn.net/wubihang/article/details/53084276 二:Eclipse+ADT和And...
  • wubihang
  • wubihang
  • 2016-11-08 17:11:32
  • 1997

Genymotion启动失败解决方案

工欲善其事,必先利其器! 因为MyEclipse自带的模拟器启动需要相当长时间,允许速度也超级慢,手机也由于各种原因安装不了软件,因为这些原因,Android开发过程对我来说是件多么痛苦的事情。今天早...
  • w20096019
  • w20096019
  • 2015-05-10 10:47:54
  • 1771

Genymotion安卓模拟器和VirtualBox虚拟机安装、配置、测试(win7_64bit)

Genymotion安卓模拟器和VirtualBox虚拟机安装、配置、测试(win7_64bit)     目录       1.概述       2.本文用到的工具       3.Virt...
  • miaozhenzhong
  • miaozhenzhong
  • 2016-10-06 19:09:09
  • 1850

win10更新版本之后选择适合的VirtualBox&genymotion版本

问题描述:VirtualBox版本常常与win10版本出现不兼容,这对于我们用genymotion的安卓开发人员是很头疼的,如果你遇到VirtualBox打不开,或者Genymotion打开后出现如下...
  • cobbwho
  • cobbwho
  • 2017-05-12 21:14:46
  • 2004

win7下搭建安卓开发环境

  • 2014年05月22日 17:17
  • 848KB
  • 下载

使用VirtualBox + Vagrant打造统一的开发环境

配置步骤 安装VirtualBox 虚拟系统运行在VirtualBox中,类似的工具还有VMware,但后者是收费的。 VirtualBox下载地址: https://www.virtual...
  • open520yin
  • open520yin
  • 2017-02-08 15:47:35
  • 1029
    个人资料
    持之以恒
    等级:
    访问量: 1万+
    积分: 1380
    排名: 3万+
    博客专栏
    文章存档