Difference between revisions of "IoTGateway/BSP/Android/ApplicationDevelopGuide"

From ESS-WIKI
Jump to: navigation, search
Line 61: Line 61:
  
 
== ADB Tool ==
 
== ADB Tool ==
 +
 +
=== ADB Environment Configuartion ===
 +
 +
#
 +
 +
=== Add platform-tools path<br/>Computer -> Properties -> Advanced system settings -> Advanced -> envionment 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; ===
 +
 +
#Restart the computer.
 +
#Verification.<br/>Open cmd.exe and Execute the adb command.
 +
 +
=== How to use Android ADB ===
 +
 +
ADB debugging needs to ensure that the device is in developer mode
 +
 +
==== Use otg to connect. ====
 +
 +
#View the device
 +
#Enter the shell terminal and execute the shell command
 +
#Exit the shell command
 +
 +
==== Use the LAN to connect. ====
 +
 +
#Restart devices service<br/>Network debugging must ensure that debugging machine and equipment in the same local area network. First use the otg link device to execute the following command and then disconnect the otg link.
 +
#connect devices
 +
#Enter the shell terminal and execute the shell command
 +
#Exit the shell command
 +
#Disconnect the link
 +
 +
For get more information about ADB, please visit&nbsp;the official user guide&nbsp;[http://adbshell.com/ http://adbshell.com/].

Revision as of 07:18, 6 February 2017

preparations

Please download "jdk-8u121-windows-x64.exe" from http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html. Launch the .exe file you downloaded . Follow the setup wizard to install JDK .

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;

Build Android Studio development environment

Build Eclipse development environment

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

After the download is complete, unzip directly to the desired directory, double-click the eclipse icon to use, without additional installation process.

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:

  1. Open eclipse->help->install new software
  2. Click Add to Add Repository
    Name:Android
    Location:https://dl-ssl.google.com/android/eclipse
  3. Choose Developer Tools.
  4. Click Next.
  5. Agree with the license.
  6. Installing ADT plug-in.
  7. Install finished and Restart Eclipse.

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:

  1. Click Next to start setup.
  2. Choose Users.
  3. Set installation location.
  4. Installing Android SDK Tool.
  5. Install SDK Tool finushed.
  6. Open SDK Manager.
  7. Choose the necessary components,Then Click Install to Installing SDK components.
  8. Install finushed.
  9. Open eclipse->Window->preferences.
  10. Click Android and Browse to Set SDK Location.
    SDK Location: Fill in the path of your SDK installation

ADB Tool

ADB Environment Configuartion

Add platform-tools path
Computer -> Properties -> Advanced system settings -> Advanced -> envionment 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;

  1. Restart the computer.
  2. Verification.
    Open cmd.exe and Execute the adb command.

How to use Android ADB

ADB debugging needs to ensure that the device is in developer mode

Use otg to connect.

  1. View the device
  2. Enter the shell terminal and execute the shell command
  3. Exit the shell command

Use the LAN to connect.

  1. Restart devices service
    Network debugging must ensure that debugging machine and equipment in the same local area network. First use the otg link device to execute the following command and then disconnect the otg link.
  2. connect devices
  3. Enter the shell terminal and execute the shell command
  4. Exit the shell command
  5. Disconnect the link

For get more information about ADB, please visit the official user guide http://adbshell.com/.