Difference between revisions of "IoTGateway/BSP/Android/ApplicationDevelopGuide"
Fengchao.dai (talk | contribs) |
|||
(50 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
− | == | + | == JDK Install == |
− | JDK | + | === JDK download === |
+ | |||
+ | Please download "jdk-8u121-windows-x64.exe" from [http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html]. | ||
+ | |||
+ | === JDK install === | ||
+ | |||
+ | Launch the .exe file you downloaded . Follow the setup wizard to install JDK . | ||
+ | |||
+ | === JDK Environment Configuartion === | ||
+ | |||
+ | #Then refer to the following step to open system variables window:<br/>Computer -> Properties -> Advanced system settings -> Advanced -> envionment variables.<br/>[[File:Environment0.gif|RTENOTITLE]] | ||
+ | #Create a new system variable JAVA_HOME. The variable value is the location where JDK installed, such as: D:\Program Files\Java\jdk1.8.0_121[[File:Environment2.gif|RTENOTITLE]] | ||
+ | #Create a new system variable CLASS_PATH. The variable value is: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;<br/>[[File:Environment3.gif|RTENOTITLE]] | ||
+ | #Edit system variable PATH. Add: %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;<br/>[[File:Environment4.gif|RTENOTITLE]] | ||
+ | #Restart the computer | ||
== Build Android Studio development environment == | == Build Android Studio development environment == | ||
+ | |||
+ | === Introduction === | ||
+ | |||
+ | This document describes how to build Android Application development environment(Android Studio v2.2.3) for Windows. Android Studio is the official Integrated Development Environment(IDE) for Android app development, based on IntelliJ IDEA . For an introduction to Android Studio, please visit the websit <u>[https://developer.android.com/studio/intro/index.html https://developer.android.com/studio/index.html]</u>. | ||
+ | |||
+ | === To install JDK === | ||
+ | |||
+ | Please refer to Chapter 1 "JDK Install". | ||
+ | |||
+ | === To install Android Studio === | ||
+ | |||
+ | Please download "android-studio-bundle-145.3276617-windows.exe" from [https://developer.android.com/studio/index.html <u>https://developer.android.com/studio/index.html</u>]. Launch the .exe file you downloaded. Follow the setup wizard to install Android Studio and any necessary SDK tools. The following pictures shows each step of the recommended setup procedure: | ||
+ | |||
+ | 1 - Click Next to start setup. | ||
+ | |||
+ | [[File:Build env 1.png|RTENOTITLE]] | ||
+ | |||
+ | 2 - Choose components. | ||
+ | |||
+ | [[File:Build env 2.png|RTENOTITLE]] | ||
+ | |||
+ | 3 - Agree with the license. | ||
+ | |||
+ | [[File:Build env 3.png|RTENOTITLE]] | ||
+ | |||
+ | 4 - Set installation location. | ||
+ | |||
+ | [[File:Build env 4.png|RTENOTITLE]] | ||
+ | |||
+ | 5 - Choose start menu folder. | ||
+ | |||
+ | [[File:Build env 5.png|RTENOTITLE]] | ||
+ | |||
+ | 6 - Installing Android Studio. | ||
+ | |||
+ | [[File:Build env 6.png|RTENOTITLE]] | ||
+ | |||
+ | 7 - Install finushed. | ||
+ | |||
+ | [[File:Build env 7.png|RTENOTITLE]] | ||
+ | |||
+ | Then, Refer to the following step to install Android SDK (You might see these pictures(8~14) when you use Android Studio for the first time. If you have no idea how to do, Just ignore them and always choose the next step.): | ||
+ | |||
+ | 8 - Import settings from a previous version of studio. | ||
+ | |||
+ | [[File:Build env 8.png|RTENOTITLE]] | ||
+ | |||
+ | 9 - Click Cancel to continue. | ||
+ | |||
+ | [[File:Build env 9.png|RTENOTITLE]] | ||
+ | |||
+ | 10 - Click Next to continue. | ||
+ | |||
+ | [[File:Build env 10.png|RTENOTITLE]] | ||
+ | |||
+ | 11 - Choose the setup type. | ||
+ | |||
+ | [[File:Build env 11.png|RTENOTITLE]] | ||
+ | |||
+ | 12 - Check the Android SDK components you want to install. | ||
+ | |||
+ | [[File:Build env 12.png|RTENOTITLE]] | ||
+ | |||
+ | 13 - Verify settings and start SDK install. | ||
+ | |||
+ | [[File:Build env 13.png|RTENOTITLE]] | ||
+ | |||
+ | 14 - Installing Android SDK. | ||
+ | |||
+ | [[File:Build env 14.png|RTENOTITLE]] | ||
+ | |||
+ | 15 - Finished install. | ||
+ | |||
+ | [[File:Build env 15.png|RTENOTITLE]] | ||
+ | |||
+ | For get more information about Android Studio, please visit the official user guide [https://developer.android.com/studio/intro/index.html <u>https://developer.android.com/studio/intro/index.html</u>]. | ||
== Build Eclipse development environment == | == Build Eclipse development environment == | ||
+ | |||
+ | === To install JDK === | ||
+ | |||
+ | Please refer to Chapter 1 "JDK Install". | ||
+ | |||
+ | === To install Eclipse === | ||
+ | |||
+ | Please download "eclipse-jee-juno-SR2-win32-x86_64.zip" from | ||
+ | |||
+ | [http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR2/eclipse-jee-juno-SR2-win32-x86_64.zip http://www.eclipse.org/downloads/download.php?file=/technology/epp/downloads/release/juno/SR2/eclipse-jee-juno-SR2-win32-x86_64.zip] . | ||
+ | |||
+ | After the download is complete, unzip directly to the desired directory, double-click the eclipse icon to use, without additional installation process. | ||
+ | |||
+ | === To install Android ADT Plug-in === | ||
+ | |||
+ | Follow the setup wizard to install Android ADT plug-in . | ||
+ | |||
+ | The following pictures shows each step of the recommended setup procedure: | ||
+ | |||
+ | #Open eclipse->help->install new software<br/>[[File:Adt1.jpg|RTENOTITLE]] | ||
+ | #Click Add to Add Repository<br/>Name:Android<br/>Location:[https://dl-ssl.google.com/android/eclipse https://dl-ssl.google.com/android/eclipse<br/>[[File:Adt2.jpg|RTENOTITLE]]] | ||
+ | #Choose Developer Tools.<br/>[[File:Adt3.jpg|RTENOTITLE]] | ||
+ | #Click Next.<br/>[[File:Adt4.jpg|RTENOTITLE]] | ||
+ | #Agree with the license.<br/>[[File:Adt5.jpg|RTENOTITLE]] | ||
+ | #Installing ADT plug-in.<br/>[[File:Adt6.jpg|RTENOTITLE]] | ||
+ | #Install finished and Restart Eclipse.<br/>[[File:Adt7.jpg|RTENOTITLE]] | ||
+ | |||
+ | === To install SDK === | ||
+ | |||
+ | Please download " installer_r24.1.2-windows.exe " from [https://dl.google.com/android/installer_r24.1.2-windows.exe https://dl.google.com/android/installer_r24.1.2-windows.exe]. Launch the .exe file you downloaded . Follow the setup wizard to install necessary SDK tools. | ||
+ | |||
+ | The following pictures shows each step of the recommended setup procedure: | ||
+ | |||
+ | #Click Next to start setup.<br/>[[File:Sdk1.jpg|RTENOTITLE]] | ||
+ | #Choose Users.<br/>[[File:Sdk2.jpg|RTENOTITLE]] | ||
+ | #Set installation location.<br/>[[File:Sdk3.jpg|RTENOTITLE]] | ||
+ | #Installing Android SDK Tool. | ||
+ | #Install SDK Tool finushed.<br/>[[File:Sdk4.jpg|RTENOTITLE]] | ||
+ | #Open SDK Manager.<br/>[[File:Sdk5.jpg|RTENOTITLE]]<br/>[[File:Sdk6.jpg|RTENOTITLE]] | ||
+ | #Choose the necessary components,Then click Install to installing SDK components.<br/>[[File:Sdk7.jpg|RTENOTITLE]] | ||
+ | #Install finushed.<br/>[[File:Sdk8.jpg|RTENOTITLE]]<br/>[[File:Sdk9.jpg|RTENOTITLE]] | ||
+ | #Open eclipse->Window->preferences.<br/>[[File:Sdk10.jpg|RTENOTITLE]] | ||
+ | #Click Android and Browse to Set SDK Location.<br/>SDK Location: Fill in the path of your SDK installation<br/>[[File:Sdk11.jpg|RTENOTITLE]] | ||
== ADB Tool == | == ADB Tool == | ||
+ | |||
+ | === ADB Environment Configuartion === | ||
+ | |||
+ | #Edit system variable PATH. Add platform-tools path<br/>Then refer to the following step to open system variables window:<br/>Computer -> Properties -> Advanced system settings -> Advanced -> enviornment variables<br/>Edit system variable path. Add the variable value is the location where SDK installed, Such as:<br/>D:\eclipse-jee-juno-SR2-win32-x86_64\android-sdk\platform-tools;<br/>[[File:Adb1.gif|RTENOTITLE]] | ||
+ | #Restart the computer. | ||
+ | #Verification.<br/>Open cmd.exe and 3xecute adb command.<br/>[[File:Adb-1.png|RTENOTITLE]] | ||
+ | |||
+ | === How to use Android ADB === | ||
+ | |||
+ | ADB debugging needs to ensure that the device is in developer mode | ||
+ | |||
+ | ==== Use otg connected device for debugging. ==== | ||
+ | |||
+ | #View the device<br/>[[File:Adb-2.png|RTENOTITLE]] | ||
+ | #Enter the shell terminal and execute the shell command<br/>[[File:Adb-3.png|RTENOTITLE]] | ||
+ | #Exit the shell command<br/>[[File:Adb-4.png|RTENOTITLE]] | ||
+ | |||
+ | ==== Use the LAN connected device for debugging ==== | ||
+ | |||
+ | #Restart devices service<br/>Network debugging must ensure that debugging machine and equipment in the same local area network. First use the otg connect device to execute the following command and then disconnect the otg connection.<br/>[[File:Adb-5.png]] | ||
+ | #connect devices<br/>[[File:Adb-6.png]] | ||
+ | #Enter the shell terminal and execute the shell command<br/>[[File:Adb-7.png]] | ||
+ | #Exit the shell command<br/>[[File:Adb-4.png]] | ||
+ | #Disconnect the devices<br/>[[File:Adb-8.png]] | ||
+ | |||
+ | For get more information about ADB, please visit the official user guide [http://adbshell.com/ http://adbshell.com/]. |
Latest revision as of 08:10, 7 February 2017
Contents
JDK Install
JDK download
Please download "jdk-8u121-windows-x64.exe" from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html.
JDK install
Launch the .exe file you downloaded . Follow the setup wizard to install JDK .
JDK Environment Configuartion
- Then refer to the following step to open system variables window:
Computer -> Properties -> Advanced system settings -> Advanced -> envionment variables. - Create a new system variable JAVA_HOME. The variable value is the location where JDK installed, such as: D:\Program Files\Java\jdk1.8.0_121
- Create a new system variable CLASS_PATH. The variable value is: .;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar;
- Edit system variable PATH. Add: %JAVA_HOME%\bin;%JAVA_HOME%\jre\bin;
- Restart the computer
Build Android Studio development environment
Introduction
This document describes how to build Android Application development environment(Android Studio v2.2.3) for Windows. Android Studio is the official Integrated Development Environment(IDE) for Android app development, based on IntelliJ IDEA . For an introduction to Android Studio, please visit the websit https://developer.android.com/studio/index.html.
To install JDK
Please refer to Chapter 1 "JDK Install".
To install Android Studio
Please download "android-studio-bundle-145.3276617-windows.exe" from https://developer.android.com/studio/index.html. Launch the .exe file you downloaded. Follow the setup wizard to install Android Studio and any necessary SDK tools. The following pictures shows each step of the recommended setup procedure:
1 - Click Next to start setup.
2 - Choose components.
3 - Agree with the license.
4 - Set installation location.
5 - Choose start menu folder.
6 - Installing Android Studio.
7 - Install finushed.
Then, Refer to the following step to install Android SDK (You might see these pictures(8~14) when you use Android Studio for the first time. If you have no idea how to do, Just ignore them and always choose the next step.):
8 - Import settings from a previous version of studio.
9 - Click Cancel to continue.
10 - Click Next to continue.
11 - Choose the setup type.
12 - Check the Android SDK components you want to install.
13 - Verify settings and start SDK install.
14 - Installing Android SDK.
15 - Finished install.
For get more information about Android Studio, please visit the official user guide https://developer.android.com/studio/intro/index.html.
Build Eclipse development environment
To install JDK
Please refer to Chapter 1 "JDK Install".
To install Eclipse
Please download "eclipse-jee-juno-SR2-win32-x86_64.zip" from
After the download is complete, unzip directly to the desired directory, double-click the eclipse icon to use, without additional installation process.
To install Android ADT Plug-in
Follow the setup wizard to install Android ADT plug-in .
The following pictures shows each step of the recommended setup procedure:
- Open eclipse->help->install new software
- Click Add to Add Repository
Name:Android
Location:https://dl-ssl.google.com/android/eclipse - Choose Developer Tools.
- Click Next.
- Agree with the license.
- Installing ADT plug-in.
- Install finished and Restart Eclipse.
To install SDK
Please download " installer_r24.1.2-windows.exe " from https://dl.google.com/android/installer_r24.1.2-windows.exe. Launch the .exe file you downloaded . Follow the setup wizard to install necessary SDK tools.
The following pictures shows each step of the recommended setup procedure:
- Click Next to start setup.
- Choose Users.
- Set installation location.
- Installing Android SDK Tool.
- Install SDK Tool finushed.
- Open SDK Manager.
- Choose the necessary components,Then click Install to installing SDK components.
- Install finushed.
- Open eclipse->Window->preferences.
- Click Android and Browse to Set SDK Location.
SDK Location: Fill in the path of your SDK installation
ADB Tool
ADB Environment Configuartion
- Edit system variable PATH. Add platform-tools path
Then refer to the following step to open system variables window:
Computer -> Properties -> Advanced system settings -> Advanced -> enviornment variables
Edit system variable path. Add the variable value is the location where SDK installed, Such as:
D:\eclipse-jee-juno-SR2-win32-x86_64\android-sdk\platform-tools; - Restart the computer.
- Verification.
Open cmd.exe and 3xecute adb command.
How to use Android ADB
ADB debugging needs to ensure that the device is in developer mode
Use otg connected device for debugging.
Use the LAN connected device for debugging
- Restart devices service
Network debugging must ensure that debugging machine and equipment in the same local area network. First use the otg connect device to execute the following command and then disconnect the otg connection. - connect devices
- Enter the shell terminal and execute the shell command
- Exit the shell command
- Disconnect the devices
For get more information about ADB, please visit the official user guide http://adbshell.com/.