Android 4.0 SDK offline installation)

Source: Internet
Author: User

From: http://networking.ctocio.com.cn/110/12195610.shtml

As a IT personnel, can't wait to rush to the http://developer.android.com to see if there is any new SDK published, at that time is the morning, did not see any updates, I thought it must be a few days before the release. I did not expect my colleague to tell me that the new SDK version has been released this afternoon. At that time, it was coming to work. Due to the well-known reasons in China, access to Google was very slow, and an SDK was dozens or hundreds of megabytes. If you use SDK manager to download it, it would be too hard. So I continued to use my old method-Offline installation.

I used to find an offline SDK Installation Method on the Internet and download the SDK successfully:

Http://dl-ssl.google.com/android/repository/

You can download the file with a file name similar to unzip android-1.6_r03-windows.zip. This file name depends entirely on the SDK description file.

Http://dl-ssl.google.com/android/repository/repository.xml

But with the release of the android 4.0 SDK, the content of this file has been changed, leaving only platform tools and SDK tools. The real core platform and simulator are no longer available.

In fact, the SDK tool is a simplified version of the SDK framework. Only tools are retained, and other directory structures are simplified. However, I think the SDK framework is good.

Because it is much larger than the SDK tool itself, but the built-in directory structure after decompression does not require you to create fixed folders.

By the way, the platform tools and SDK frameworks required in the android 4.0 development environment are different. Update to the new version. Currently, the minimum version is:

SDK release 14: android-sdk_r14-release depends on the operating system. Zip

Platform-tools release 8: platform-tools_r08-depends on the operating system. Zip

The SDK framework can be directly downloaded at http://developer.android.com/sdk. Here is the download link of the SDK framework in Windows:

Http://dl.google.com/android/android-sdk_r14-windows.zip

The Platform tool can be found in the repository. xml mentioned above, and can be downloaded separately based on different development operating systems. Here is the download link of the platform tool in the Windows operating system:

Http://dl-ssl.google.com/android/repository/platform-tools_r08-windows.zip

Download the SDK framework and decompress it. I decompress the framework to the D: \ Android-SDK-Windows directory ,:

Decompress the platform tool to this directory. Note that the "platform-Tools" directory corresponds to the "platform-Tools" directory in the compressed package.

The next step is to download the most important Android 4.0 platform. The repository. xml file has been officially modified. So how can we find the latest and previous platform packages?

According to the access record after SDK manager.exe is started, I found the new address:

Http://dl-ssl.google.com/android/repository/repository-5.xml

This is the XML file that saves the latest and previous platform packages. From the analysis in the file, we know that the download path of 4.0 of the platform package is:

Http://dl-ssl.google.com/android/repository/android-14_r01.zip

In fact, I only found android-14_r01.zip from the file. As for the previous path, I tried to guess it from the official address of the platform package of the previous version. The official storage structure has not changed.

After the package is downloaded, decompress the package to the "platforms" folder:

The blue circle is the newly added Android 4.0 platform.

When I completed this step, I was eager to build a simulator. However, an error occurs during creation, indicating that userdata. IMG cannot be found.

Then I compared the android 4.0 platform with other versions and found that the "Images" directory is missing in the new version, I also cleverly copied files from other platforms and pasted them to the new platform.

Finally, I found that it was not possible to load kernel data. In fact, I had doubts when I first downloaded this platform.

Because the platform package officially released in 2.3.3 already has MB, how can the platform package of the new version be less than 43.92m? So I re-opened the SDK manager to find the cause.

In the old version of the platform, the system image has been separated, as shown in the blue box.

So I returned

Http://dl-ssl.google.com/android/repository/repository-5.xml

Find the system image in this XML file, and I finally found it:

Http://dl-ssl.google.com/android/repository/sysimg_armv7a-14_r01.zip

But the problem is coming again. Since it is separated, Where can it be placed after decompression? I tried to put it in the "Images" directory of the platform like other platforms, and the result failed.

The Virtual Machine is created, but cannot be started for half a day.

Later, I figured out which platforms are installed and which are not installed after SDK manager starts. Since it knows, why don't I analyze its behavior?

Use the Process Monitor Tool in sysinternalssuite to monitor it. (The SDK Manager uses an EXE shell, which is actually written in Java, therefore, the SDK manager.execannot be found in the process, and the corresponding java.exe ). After analysis, I found the directory where the image should be stored:

System-images \ Android-14 \ armeabi-v7a under the SDK directory, as shown in:

Delete the previously created simulator (because it cannot be started, it is simply deleted), and re-build the android 4.0 simulator. OK, all done! It works!

Below are two simulators:

Conclusion: The new version was not fully tested during release. When the system language is set to Chinese, the default Google input method always crashes.

The system prompts that the Google Input Method unexpectedly exits, and then tries to restart the service. After the service is started, it crashes and then starts again after the crash. I changed the input method to English.

In addition, the android 4.0 simulator (WVGA resolution) I set up occupies 350 MB of memory and the CPU usage is also 30 ~ In the range of 50%.

The cpu I use is Pentium D dual-core e5300 2.6 GHz. The local memory is 2 GB. After a colleague's experiment, when using a small-resolution simulator, the memory usage is not very different.

However, the smoothness of the Small-resolution simulator is much better than that of the large-resolution simulator. If the machine performance is not good, it is recommended to use a simulator with a small resolution for debugging.

After writing this article, a friend reported that the wxga resolution simulator in the 4.0 simulator was unavailable. After my experiments, I found that the situation was true. Although I could create AVD, I couldn't start the corresponding AVD after clicking the "Start" button in AVD manager. I found that to test the tablet environment, you can use the wsvga resolution configuration. This AVD can be started. The configuration is as follows:

The following are the two AVD after startup:

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.