For well-known reasons, there is a red wall in our network environment, which leads us to have a lot of problems when we configure our environment-we can't connect to Google servers to download some dependent packages.Android Studio is really disgusting, today is the nth time said, all kinds of configuration after the thought can be happy to write code, but offline work when new project finished Xxxxactivity.xml cannot use graphical interface preview, cannot drag the control. Finally have the ne
Reference: http://www.oschina.net/question/1399261_195245Android SDK for a long time, want to update to the latest SDK package:Dalian Neusoft Institute of Information Mirror server address:-http://mirrors.neusoft.edu.cn Port: 80Beijing University mirror server address:-ipv4:http://ubuntu.buct.edu.cn/Port: 80-ipv4:http://ubuntu.buct.cn/Port: 80-ipv6:http://ubuntu.buct6.edu.cn/Port: 80Shanghai GDG Mirror server address:-Http://sdk.gdgshanghai.com Port: 8000mirrors.neusoft.edu.cn Port: 80How to use
Original address: http://blog.csdn.net/exlsunshine/article/details/22208857The Celestial network ... Ah ~ really no words ... Fortunately recently installed Google Chrome + red apricot, finally see the world outside the big wall ...Red Apricot plugin can only be used in chrome, if you can set Google Browser as a proxy.Recently want to install an Android development environment, Android SDK
Recently, I want to create a task manager on the Android 2.2 platform. The former API: restartpackage is invalid on Android 2.2.
The restartpackage API is valid on platforms 1.5 and 1.6: activitymanager. restartpackage (pakagename );
The test failed multiple times on 2.2. Later, I checked the framework and found that it was blocked by Google? No alternative API i
Android DDMS connection to the real machine (root), with file explore to see the Data/data folder solutionThe problem is no permission, with 360 mobile phone helper or pea pod is also invisible. The easy way is to use the RE File manager (grant root permission), set data and Data/data to 777 permissionsNote: Open with the RE
1.SRC: Store all the *.java source programs.2.gen: Save path for automatically generated code file for ADT plug-in, R.java will save all resource IDs.3.assets: Can hold the project some large resource files, such as: pictures, music, fonts and so on.4.res: Can store all the resource files in the project, for example: Pictures (*.png, *.jpg), text, etc.5.RES/DRAWABLE-HDPI: Save a high-resolution picture resource, you can use Resources.getdrawable (ID) to get the resource type.6.RES/DRAWABLE-LDPI:
LinearLayout class, the following three properties are supported in addition to all properties that support LinearLayout
XML Properties
method
description
Android:collapsecolumns
setcolumncollapsed (Int,boolean)
Sets the ordinal of the column that needs to be hidden, and multiple uses are separated by commas
Android:shrinkcolumns
Setshrinkallcolumns (Boolean)
Sets the number
The Download manager is introduced in android 2.3 as a service to optimize the processing of long Download operations. Download Manager ensures that each Download is successful by handling HTTP links, monitoring link changes, and system restart.
Download an object;
Public void funclick (View view) {String serviceString = Context. DOWNLOAD_SERVICE; DownloadMan
Problem Description:the Android SDK Manager cannot download the update, or the update is very slow, or the list of packages to be installed is not displayed. Open the Hosts file and add the following code in its trailing margin to save:#Google主页203.208.46.146Wwwgoogle. #这行是为了方便打开Android开发官网 now seems to be not VPN can also open 74.125. Developer.. COM #更新的内容从
In the above article, we have implemented the use of service to design Hal. However, according to the android framework, generally, applications do not directly communicate with the service, but need to go through a manager layer in the middle.
We will further optimize the Hal Design Based on the android framework here. The structure is as follows:
Hal stub
Beca
, system. currenttimemillis () + 5000, Sender );
Am. setrepeating (alarmmanager. rtc_wakeup, C. gettimeinmillis (), 10000, Pi );Based on the above method, the function of repeated execution is added. The second-to-last parameter is the interval, in milliseconds.Am. Cancel (PI); // cancel the registered alarm that matches the ParameterPublic void cancel (pendingintent Operation)Since: API Level 1 remove any alarms with a matching intent. Any alarm, of any type, whose intent matches this one (as d
FAQ:I have downloaded some sdks in my android SDK manager, but now I want to download the new SDK again. Why is the packages list not displayed? What should I do?
Answer:It is said that dl-ssl.google.com was strong in the Mainland, the great tianchao really don't let people live, the solution is to modifyC: \ windows \ system32 \ drivers \ etc \ hostsFile. Add a row:
74.125.237.1Dl-ssl.google.com
N
A Real-time folder is a desktop component used to display data information provided by a ContentProvider. To create a real-time folder, you must have two support options. On the one hand, you need to define an Activity for creating real-time folders. On the other hand, the ContentProvider of the specified data information URI must support real-time folder query.
From the previous article "Android screen adaptation to the full guide" after writing, often a friend asked me this question: "Can an app only provide a set of graphs to adapt to all the resolution?" "I think it is necessary to write an article to study the problem, so there is this article."
Research content
Research methods
Test environment
Research process
Results analysis
Conclusion
A
I have just read a simple Android example of the next frame layout. After a long time, I don't know how to add the image to the drawable in the resource.For example, how to add a new image resource in the Res/drawable folder of testdemo.
Copy the image to bin \ res \ drawable-hdpi orBin \ res \Click drawable-mdpi and refresh the image in eclipse.
I found a solution for loading image resources online:
when using the real machine to develop Android, after the eclipse is connected, the default in the File Explorer is not open the Data folder of our phone, which is not open because of insufficient permissions. Here's a little trick to solve the problem. first, the test machine Root First, then install the R.E Manager (or similar software) on your phone, and then
densities and automatically matches according to the screen resolution.If android:anydensity= "false"The application supports different densities, and the system automatically scales the image size and coordinates of the image. Explain how the system automatically scales resources.For example, if we have the same resource under the Hdpi,mdpi,ldpi folder, then the application will not automatically go to the appropriate
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.