I. General-purpose Android environment and tool configuration
1. System Update upgrade
sudo apt-get updatesudo apt-get upgrade
2. Configure the Ntlmaps Agent Internet environment (the company network needs agents)
sudo apt-get updatesudoinstall ntlmaps
Parent Proxy:cnkusisal
Parent Proxy port:8080
NT Windows DOMAIN:WKSCN
If you need to reconfigure Ntlmaps later, you can use the following command:
sudo dpkg-reconfigure ntlmaps
3. Install Sogou Input Method
Download the Linux version Sogou input: http://pinyin.sogou.com/linux/
Install Input Method:
sudo Install -fsudo dpkg-i sogoupinyin_2. 0.0. 0072_amd64.deb
Open Language Settings
Fcitx-config-gtk3
If you do not have a keyboard, check all of the addon and restart
Press +, do not tick "only ...", select Sogou, restart
4. Install the Vim text editor
sudo Install Vim
5. Install additional tools
A. Installation system condition monitoring Syspeek
sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo Install Syspeek
B. Install a bunch of gadgets like WGET,UNRAR,GIT,GITK
sudo Install wget Schedtool Pngcrush sudo Install -y nautilus-open-terminal unrar meld ghex gtk-recordmydesktop GITK
C. Install Google Chrome
Don't like Firefox, you can install Google Chrome.
Google Chrome cannot be found in software center, but chromium can be installed.
6. Configure Repo and Git
Configure Repo
Put the saved repo file under ~/bin/, the Bin folder does not exist, please create it, execute
chmod a+x ~/bin/repoexport PATH= $PATH: ~/bin
Configure Git
previous configuration of git on your computer , copy the. ssh folder to the local home, and configure git config:
Create a ~/.ssh/config, open the input below and save
29418
To configure git config information:
" Kunkka an/xxx/wxxx " "[email protected]"
The above configured User.Name is Gerrit above the full name,email is the mailbox registered on Gerrit.
No git has been configured on the computer before
A. Creating an SSH key
Ssh-keygen " [email protected] "
Press ENTER to save to the default location, and then wait out the prompt to enter a passphrase, after the input to lose two times, it is used to encrypt the private key, that is, later when using the private key to lose the password;
Wait a minute. The key is stored in the. ssh folder of your home folder.
Open File Manager, show hidden files, you can see this folder has two files, a private key to a public key, the folder back up. Id_rsa is the key, and Id_rsa.pub is the public key.
B. Login Gerrit Configuration Related information
After logging in to Gerrit, click on the upper right corner of the settings, locate SSH keys on the right side of the Setup page, tap add SSH key.
To just the. SSH folder, double-click Open your own public key file id_rsa.pub, copy everything inside, then paste into the SSH key Settings box, then click "Add Key" below to import the key;
C follow the steps configured on the other computer above to set up git config
7. Installation Configuration JDK8
The first method (seen online, simple and convenient, but not done to verify whether it is feasible)
sudo add-apt-repository ppa:webupd8team/javasudo apt-get updatesudo Install Oracle-java8-installer
And then
sudo Install Oracle-java8-set-default
The second method of
A. Download jdk:http://www.oracle.com/technetwork/java/javase/downloads/index.html
B. Unzip the downloaded JDK to/USR/LIB/JVM below, first create the directory without the JVM at first
sudo mkdir JVM
sudo tar zxvf jdk-8u144-linux-x64. tar. Gz-c/USR/LIB/JVM
C. Configuring Environment variables
Gedit ~/.BASHRC
After opening BASHRC, start editing and add the following code to the end of the file:
Export JAVA_HOME=/USR/LIB/JVM/JDK1. 8 . 0_144export jre_home=${java_home}/JRE export CLASSPATH=.:${java_home}/lib:${jre_home}/Lib Export PATH=${java_home}/bin: $PATH
Save the exit and run the following command to make the change effective:
SOURCE ~/.BASHRC
D. Configuring the default JDK
Because there may be multiple versions of the JDK, you need to set up the JDK you just installed as the default JDK
sudo update-alternatives--install /usr/bin/java java/usr/lib/jvm/jdk1. 8 - sudo update-alternatives--install /usr/bin/javac javac/usr/lib/jvm/jdk1. 8 -
If you are prompted not to find the path, restart and try again.
E. Test configuration is successful
Java-Versionjavac
Two. Configure Android source compilation environment
1. Install the compilation library provided by Google website
sudo install bison g++-multilib git gperf libxml2-utils
2. Install other compilation-Required content
sudo Install Zip sudo Install Curl Zlib1g-dev libc6-dev lib32ncurses5-dev lib32z1 x11proto-core-devsudo Install libx11-dev lib32readline-gplv2-dev lib32z-dev libgl1-mesa-dev g++-multilibsudo Install mingw32 tofrodos python-markdown libxml2-utils xsltproc libxml-simple-perl
Three. Configure the Android app development environment
1. Install the configuration Android Studio
Copy the saved Android Studio package
or download Android Studio http://www.androiddevtools.cn/
Specific Android studio configuration and usage can refer to the following URL:
Everything you should know when using Android studio for the first time
Four. Other settings
1. Setting the ADB environment variable
The adb tool is located in the Platform-tools in the SDK directory
A. because of the copy, so set permissions .
sudo chmod -R a+x tools/androidstudio/android-studio-sdk/
B. Editing profile settings environment variables
sudo gedit/etc/profile
Add the following ( you can also use the eclipse with Android studio) path to use your own path
Export path= $PATH:/home/kunkka/tools/androidstudio/android-studio-sdk/android-sdk-linux/tools:/home/kunkka/ Tools/androidstudio/android-studio-sdk/android-sdk-linux/platform-tools
Or
Export path= $PATH:/home/kunkka/androiddeveloper/adt-bundle-linux-x86_64-20140321/sdk/platform-tools:/ home/kunkka/androiddeveloper/adt-bundle-linux-x86_64-20140321/sdk/tools
2. Android Device USB settings
If you can't identify your Android device, you need to set up a USB configuration
will save the 51-android.rules Copy to /etc/udev/rules.d/ below
Copy the saved Adb_usb.ini to the ~/.android/
for new devices , if the vid is not included in the file above , do the following.
A. The vendor ID of the new device is obtained by the LSUSB command first , and the first 4 bits behind the ID are vid.
B. Open the Edit 51-android.rules
sudo gedit/etc/udev/rules.d/Wuyi-android.rules
Then add it at the end of the file
subsystem=="usb", attrs{idvendor}=="05E0", mode=" 0666 "
The red font is the first step to get the vid.
c. Implementation
sudo service udev restart
Or
sudo /etc/init.d/udev restart
d. Open Edit Adb_usb.ini
sudo gedit ~/.android/adb_usb.ini
then add it at the end of the file 0x05e0, similarly , the red font is the first step to get the vid.
E. implementation
Kill-server
F. implementation
ADB devices
if the device is still not recognized at this time , restart your computer.
"Android" Ubuntu 16.04 builds Android development build environment