Operating System: Ubuntu12.10x64 objective: Install AndroidSDKJava to install 32-bit library files. Because some programs in AndroidSDK are 32-bit, the Ubuntux64 system must install 32-bit library files to be compatible with 32-bit programs. If the installation is not performed, adb will encounter an error: java. io. IOException: error = 2sudoapt-getinstalli
Operating System: Ubuntu 12.10x64
Objective: To install the Android SDK Java
Install the 32-bit Library File
Because some programs in the Android SDK are 32-bit, a 32-bit library file must be installed in the Ubuntu x64 system to be compatible with 32-bit programs. If the installation is not performed, adb will encounter an error: java. io. IOException: error = 2
Sudo apt-get install ia32-libs
Install Android SDK
Install jre
Sudo apt-get install openjdk-7-jre
Download the Android SDK linux, that is, adt-bundle-linux-x86_64.zip
Http://developer.android.com/sdk/index.html
Decompress the package to obtain the directory adt-bundle-linux-x86_64.
Unzip adt-bundle-linux-x86_64.zip
Sudo ln-s/home/u1/Downloads/adt-bundle-linux-x86_64/sdk/platform-tools/adb/usr/bin/
Sudo ln-s/home/u1/Downloads/adt-bundle-linux-x86_64/sdk/tools/android/usr/bin/
Adb identifies Android devices (mobile phones, tablets, etc)
Android devices: system settings-Application-unknown sources. Select this option.
Android devices: system settings-application programs-Development-USB debugging. Select this option.
Android devices connect to your computer through USB cables.
Adb devices
If the display List of devices attached ???????????? No permissions indicates that the device cannot be identified. modify the configuration to identify the device. The steps are as follows.
Run lsusb when you plug in the mobile phone, unplug the mobile phone, and run lsusb. If one line is missing, it is the device.
For example, Bus 002 Device 003: ID 0bb4: 0ccf High Tech Computer Corp. indicates that HTC vendor ID is 0bb4
Xiaomi's 1 s Bus 002 Device 007: ID 18d1: 9025 Google Inc., indicating that Xiaomi's vendor ID is 18d1
Sudo vi/etc/udev/rules. d/51-android.rules
Enter the vendor ID, for example, 0bb4.
SUBSYSTEM = "usb", ATTR {idVendor} = "0bb4", MODE = "0666", GROUP = "plugdev" sudo chmod a + r/etc/udev/rules. d/51-android.rules
Sudo service udev restart
Adb kill-serveradb start-server
Unplug the device and connect it again.
Adb devices
If the display is normal, you can.
Create an android Virtual Device AVD
If you do not have an Android phone or tablet, you can run it on the Android virtual machine.
Android
Tools-> Manager AVDs-> new
Handwritten hello world
Todo
References: http://developer.android.com/sdk/installing.html
:
For more information about Ubuntu, see Ubuntu special page http://www.linuxidc.com/topicnews.aspx? Tid = 2
For more information about Android, see Android topics page http://www.linuxidc.com/topicnews.aspx? Tid = 11