create account

[JAVA #20] [App Automation Testing #1] Install Android Studio and Set ANDROID_HOME [CN] by june0620

View this thread on: hive.blogpeakd.comecency.com
· @june0620 ·
$6.91
[JAVA #20] [App Automation Testing #1] Install Android Studio and Set ANDROID_HOME [CN]
https://cdn.pixabay.com/photo/2016/09/11/05/34/whatsapp-interface-1660652_1280.png
image source: [pixabay](https://pixabay.com/)
***
续网页自动化,记录安卓app自动化到区块链。
Appium基于Selenium诞生,可以自动化安卓app,iphone app,PC app及MAC app。
是不是觉得很强大,因为它是基于Selenium,所以很多函数继承与Selenium故易上手。

我这次要记录的是安卓app,为什么?因为没做过iphone app 或者其他平台。


##### 安装 Andriod Studio 

👇 那先安装 Android Studio 吧。在 https://developer.android.com/studio 可下载。
![1.png](https://files.steempeak.com/file/steempeak/june0620/exq1mIw6-1.png)

👇 安装方法与其他程序大同小异,点击下一步即可。
![2.png](https://files.steempeak.com/file/steempeak/june0620/KnPVFBCP-2.png)

👇 安装后第一次运行时也类似,种类,主题,所需组件等都可以按指南进行即可。
![3.png](https://files.steempeak.com/file/steempeak/june0620/TMbPxHtr-3.png)

👇 Studio运行画面如下。因我不是开发,忽略其他只看 avd manager以及 sdk manager。
![4.png](https://files.steempeak.com/file/steempeak/june0620/bejx5U1o-4.png)

👇 先点击 avd manager。avd为安卓的模拟器,在这里我们可以安装合适的安卓版本到模拟器,最好选择支持play store的版本吧。  
![5.png](https://files.steempeak.com/file/steempeak/june0620/tgN8Rzjz-5.png)

👇 其次研究一下 sdk manager。 全称为`Software Development Kit`,开发或测试安卓应用时必备的程序。重要的是安装的路径,默认路径一般是 `C:\Users\电脑名\AppData\Local\Android\Sdk`,先记下来。在`SDK Platforms`标签页选择所需的安卓版本,在`SDK Tools`标签页也选择所需的工具。 
![6.png](https://files.steempeak.com/file/steempeak/june0620/Kb0krRKT-6.png)

![image.png](https://files.peakd.com/file/peakd-hive/june0620/VsqAnTU1-image.png)

 👇 点击 Apply 安装。安装途中如显示license相关提示,点击 Accept 即可。
![image.png](https://files.peakd.com/file/peakd-hive/june0620/6T8vtLGV-image.png)

👇 安装途中还会显示如下页面,不麻烦,按指南走即可。
![image.png](https://files.peakd.com/file/peakd-hive/june0620/LXTrQUyG-image.png)


👇 安装完列表右侧显示 installed,说明已准备好 ANDROID_HOME 的设置。 
![image.png](https://files.peakd.com/file/peakd-hive/june0620/JewfeJeC-image.png)

##### 设置 ANDROID_HOME 环境变量
(因本人的电脑是韩文系统,图只能截韩文,请见谅。)

👇 与 [JAVA_HOME](https://steemit.com/kr/@june0620/java-1-web-automation-testing-1-installing-the-jdk-and-set-javahome-cn) 类似,在环境变量设置窗口新建 ANDROID_HOME 并赋值 SDK 路径。 
![image.png](https://files.peakd.com/file/peakd-hive/june0620/7reWIzoI-image.png)

👇 系统 path 也应添加 ANDROID_HOME 路径。只需添加 tools及 platform-tools 两个即可。 
![image.png](https://files.peakd.com/file/peakd-hive/june0620/hwxQEAhJ-image.png)

👇 到此即完成所有的设置。正常运行模拟器,也正常安装 partiko。 
![image.png](https://files.steempeak.com/file/steempeak/june0620/QG3CCLjv-image.png)

.
.
.
.
[Cookie 😅]
Appium - http://appium.io
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjune0620
permlinkjava-20-app-automation-testing-1-install-android-studio-and-set-androidhome-cn
categoryhive-105017
json_metadata{"app":"peakd/2020.04.3","format":"markdown","tags":["cn","cn-stem","steemstem","dblog","cn-curation"],"users":["june0620"],"links":["https://pixabay.com/","https://developer.android.com/studio","https://steemit.com/kr/@june0620/java-1-web-automation-testing-1-installing-the-jdk-and-set-javahome-cn","http://appium.io"],"image":["https://cdn.pixabay.com/photo/2016/09/11/05/34/whatsapp-interface-1660652_1280.png","https://files.steempeak.com/file/steempeak/june0620/exq1mIw6-1.png","https://files.steempeak.com/file/steempeak/june0620/KnPVFBCP-2.png","https://files.steempeak.com/file/steempeak/june0620/TMbPxHtr-3.png","https://files.steempeak.com/file/steempeak/june0620/bejx5U1o-4.png","https://files.steempeak.com/file/steempeak/june0620/tgN8Rzjz-5.png","https://files.steempeak.com/file/steempeak/june0620/Kb0krRKT-6.png","https://files.peakd.com/file/peakd-hive/june0620/VsqAnTU1-image.png","https://files.peakd.com/file/peakd-hive/june0620/6T8vtLGV-image.png","https://files.peakd.com/file/peakd-hive/june0620/LXTrQUyG-image.png","https://files.peakd.com/file/peakd-hive/june0620/JewfeJeC-image.png","https://files.peakd.com/file/peakd-hive/june0620/7reWIzoI-image.png","https://files.peakd.com/file/peakd-hive/june0620/hwxQEAhJ-image.png","https://files.steempeak.com/file/steempeak/june0620/QG3CCLjv-image.png"]}
created2020-04-19 12:07:06
last_update2020-04-19 12:07:06
depth0
children2
last_payout2020-04-26 12:07:06
cashout_time1969-12-31 23:59:59
total_payout_value3.947 HBD
curator_payout_value2.959 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length2,317
author_reputation118,592,211,436,406
root_title"[JAVA #20] [App Automation Testing #1] Install Android Studio and Set ANDROID_HOME [CN]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,906,162
net_rshares10,959,711,365,211
author_curate_reward""
vote details (58)
@also.einstein ·
赶不上大佬发帖,失去了叫踢铺的机会。!shop
properties (22)
authoralso.einstein
permlinkre-june0620-2020419t211341722z
categoryhive-105017
json_metadata{"tags":["cn","cn-stem","steemstem","dblog","cn-curation"],"app":"esteem/2.2.5-mobile","format":"markdown+html","community":"hive-125125"}
created2020-04-19 13:13:51
last_update2020-04-19 13:13:51
depth1
children1
last_payout2020-04-26 13:13:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length23
author_reputation5,382,405,081,240
root_title"[JAVA #20] [App Automation Testing #1] Install Android Studio and Set ANDROID_HOME [CN]"
beneficiaries
0.
accountesteemapp
weight300
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,906,795
net_rshares0
@june0620 ·
多谢多谢🙏,好久不见~ 😄
properties (22)
authorjune0620
permlinkre-alsoeinstein-q91f05
categoryhive-105017
json_metadata{"tags":["hive-105017"],"app":"peakd/2020.04.3"}
created2020-04-19 13:33:45
last_update2020-04-19 13:33:45
depth2
children0
last_payout2020-04-26 13:33:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length13
author_reputation118,592,211,436,406
root_title"[JAVA #20] [App Automation Testing #1] Install Android Studio and Set ANDROID_HOME [CN]"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id96,906,998
net_rshares0