problems.
6. Install repo
Copy codeThe Code is as follows: cd
Mkdir bin
Curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo> ~ /Bin/repo
Chmod a + x ~ /Bin/repo
Alias repo = "~ /Bin/repo"
If we need to run the repo at any time, we 'd better configure the repo in the environment:Copy codeThe Code is as follows: vim ~ /. Bashrc# After opening the file, add alias repo = "~ /Bin/repo ", save and exitSource ~ /. Bashrc
In this user environment, you can repo wherever you are.
Android development, file download must be, in this summary.Android file download need to prepare: 1, network and read and write SD card permissions settings, 2, httpurlconnection knowledge of the use of, 3, the flow of knowledge to read and write files.Here is the sample code I wrote myself to understand the Android f
Download Android code in Ubuntu
1. Install Git and Repo
First, make sure to create a/bin directory under the current user's home directory (if not), and then put it (~ /Bin) to the path environment variable.
Www.bkjia.com @ ubuntu :~ $ Vim. bashrc Add:
Export PATH = $ PATH :~ /Bin
Www.bkjia.com @ ubuntu :~ $ Source. bashrc
Www.bkjia.com @ ubuntu :~ $ Echo $ PATH/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/
last download of the place to downloadwhile (len = Is.read (b))! =-1) {raf.write (b, 0, Len); total + = Len; SYSTEM.OUT.PRINTLN ("thread" + threadId + "downloaded" + total);//Set current progress, is the sum of 3 threads currprogress + = len;pbar.setprogress (currprogress );//update the text by sending a message. The progress bar does not need to refresh the UI by sending a message, because the progress ba
By convention, I wrote it above: maybe in the process of learning Android, everyone will learn a lot of basic knowledge like me, and a lot of knowledge points can also be said 123, however, these isolated points are too fragmented after all. Therefore, I want to take the most classic mobile security guard project as an example from today and exercise on my own. I also want to communicate with you, I hope everyone can give insights and make progress to
This article describes the Android rewrite TextView to achieve a neat text typesetting method. Share to everyone for your reference, specific as follows:
Xrtextview class
Package rong.android.test;
Import Org.json.JSONArray;
Import org.json.JSONException;
Import Android.content.Context;
Import Android.graphics.Canvas;
Import Android.graphics.Color;
Import Android.graphics.Paint;
Import Android.util.AttributeSet;
Import Android.view.View;
Import
Download. in Java, the main body of the program is put, and in the util package, some common methods are put, among which fileutils. java puts some basic operations on the file, httpdownloader. java provides some basic download operations.
Step 1: first look at the main program section
Package Mars. download; import Mars. util. httpdownloader; import
on the top, similar to bidding) 3: since we need to rank by download, let's write a circular download and change the IP address at any time, just as if we had used to brush the IP address a long time ago. Let him keep repeating the download for a day. for the next 0.8 million. As for the number of opens and activity, you don't need to worry about the product ran
second is based on Labor (who pays more for the money and who is on the top, similar to bidding)
3: since we need to rank by download, let's write a circular download and change the IP address at any time, just as if we had used to brush the IP address a long time ago. Let him keep repeating the download for a day. for the next 0.8 million. As for the number of
is:
$ curl http://commondatastorage.googleapis.com/git-repo-downloads/repo > ~/bin/repoBut how do not move down, in the article (http://blog.csdn.net/legendof1991/article/details/17005849) with this URL:
$ curl http://git-repo.googlecode.com/files/repo-1.13 > ~/bin/repoYes. You can choose either of the two!
Grant executable permissions:
$ chmod a+x ~/bin/repo
PS: Actually, this is a script file written by Google to automatically download the
following command in the terminal window:
1
sudo apt-get install git-core curl
For example, in the first line, press Enter next to complete installation.
Step 5: Install the repo script
1
curl http://android.git.kernel.org/repo >~/repo
Step 6: grant repo executable permissionsThe picture is still the one above. Take a closer look.
1
chmod a+x ~/repo
Step 7: create a directory mydroid and enter t
This article provides 2 pieces of Android code, the implementation of the download from the Android client zip file and implementation of the ZIP file decompression function, very practical, the need for Android developers can try.
Download:
Downloadertask.java
Cop
The address of this project, ask Starhttps://github.com/979451341/Audio-and-video-learning-materials/tree/master/FFmpeg%E6%92%AD%E6%94%BE%E8%A7%86%E9%A2%91First FFmpeg is written in C, so we need the NDK technology, and then I use the NDK to use CMake, the first is to say how to import FFmpeg project, using my method to import ffmpeg not a minute.This requires you to first download the project code in the above code addressBecause FFmpeg this
The address of this project, ask Starhttps://github.com/979451341/Audio-and-video-learning-materials/tree/master/FFmpeg%E6%92%AD%E6%94%BE%E8%A7%86%E9%A2%91First FFmpeg is written in C, so we need the NDK technology, and then I use the NDK to use CMake, the first is to say how to import FFmpeg project, using my method to import ffmpeg not a minute.This requires you to first download the project code in the above code addressBecause FFmpeg this
Description
In fact, Android rarely use FTP and server interaction, especially the file upload and download operations, performance first, the entire code is very embarrassing, the basic need to use the native API to operate. There's not much encapsulation here,
Just complete the function, after all, FTP is not the mainstream of Android network requests. Gossip
read and understand the usage of these APIs, as shown in the example code:Https://github.com/Jhuster/AudioDemo6. Summaryabout how Android OpenSL ES API is introduced here, the article is not clear of the place to welcome messages or letters [email protected] exchange, or follow my Sina Weibo @ Lu _ June or the public number @Jhuster to obtain the latest articles and information.650) this.width=650; "src=" http://s1.51cto.com/wyfs02/M02/7F/D6/wKiom1cv
= Request.getsession (). Getservletcontext (). Getrealpath ("/vioce"); System.out.println (Realpath); File dir = new file (Realpath), if (!dir.exists ()) {dir.mkdirs ();} Fileitemfactory factory = new Diskfileitemfactory (); Servletfileupload upload = new Servletfileupload (factory); Upload.setheaderencoding ("UTF-8"); String fileName = null;try {listWe can see that when the upload method is executed, the image uploaded from the android side is alrea
After the operating system is reinstalled, You need to reconfigure the android development environment. After successful configuration, an error occurred while adding the original project!
Android requires compiler compliance level 5.0 or 6.0. Found '1. 7' instead. Please use Android tools> fix project properties.
So
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.