Problems and doubts that are easy to build in Android development environment

Source: Internet
Author: User

1.JDK is backwards compatible, JDK install high version, Eclipse, ADT, SDK installation Low this version is possible.

The version of 2.eclipse must match the version of ADT and SDK. Whether a version of Eclipse installs a higher version of ADT or a higher version of Eclipse installs a lower version of ADT, conflict is not installed during the installation , and even if the installation process passes smoothly, the installation is unsuccessful. Because after opening eclipse, there is no set of function buttons that should appear after the AVD installation succeeds in the Eclipse interface .


These few buttons are the hallmark of the AVD installation success.

3. If eclipse installs the corresponding version of ADT. Unlike the SDK version, it is possible that eclipse cannot find the Android platform version when it creates a new Android project project.


The build target is empty. Open Eclipse-->window-->preference-->android

In the red box there will be a line of the head with the Red Fork icon in English, meaning that the version of the SDK requires that the minimum version of ADT is v*.*. And is empty in the list below, without any SDK information. The corresponding SDK must be found in order to resolve this issue. In addition, after the corresponding version of the SDK has been installed and downloaded, you will need to enter the directory of the SDK in the SDK location in order to finally display the version information in the SDK.

4 If you want to include the new version of the SDK information in the directory, you can download the latest version of Android platform (Android platform version naming rules for android-*, such as Android-8, android-10, android-18, etc. Then unzip the latest version of the Android platform file and place it in the Platforms folder under the Android SDK directory. Restart Eclipse New project, the new Android platform information will appear in the current list, you can choose.

5 The naming rules for each version of the. Android source file are android-*.*-src. where SRC is the abbreviation for source. such as ANDROID-2.2-SRC. Android source files do not confuse the Android platform, the role of the Android source file is to put the code in the Android library of the classes in the source code and the class name of these classes in association. Allows us to access the source code of these classes in our own code. The method is to place the mouse over the class name, Ctrl-click the left mouse button. such as the activity class. The code should be placed under the source folder of the platform corresponding to its version. For example: ANDROID-2.2-SRC the corresponding platform is android-8. So we get android-2.2-src files, first extract and then find, the Android SDK directory, and then find the Platforms folder, and then find the Android-8 folder, After entering the folder, copy the extracted folder of ANDROID-2.2-SRC to this name to source. Then you can associate it with Eclipse. The way to relate is: Take the activity as an example. Find activity in your code. Press CTRL + LEFT mouse button to click. In the new pop-up interface, the word for the source file cannot be found and a attach button appears below. Click the button, and then follow the steps to find the above source folder to fill in the corresponding column. When the operation is completed, it will automatically refresh, and the page will show the source code of the Activity class.

6. When configuring an environment variable, configure two (I'm using eclipse3.5,android SDK2.3. Whether it is necessary to configure two in the new version is unclear) one is android_sdk_home this environment variable not only cannot rename. And the content must only be the path of the Android SDK. As for android_sdk\platforms and Android_sdk\platformstool, these two environment variables can be placed in another environment variable that can be named Android or other. The first environment variable Android_sdk_home if set incorrectly, there will be an error that the AVD cannot run. The following error message appears when you run the AVD:


And in the eclipse-window-preference under the Android-->bulid will see Defult debug keystore for C:\users\Administrator (under Win7 X64. Other versions of Windows This directory will be different) because the directory is not in the ANDROID_SDK directory. All Avd_manager cannot find the AVD information. After setting the ANDROID_SDK_HOME environment variable, restart Eclipse to view the column again, and its value will be changed to the directory where you set the ANDROID_SDK in the environment variable value. Start the AVD again to run smoothly. If the value of this column does not change, the ANDROID_SDK_HOME environment variable is not set correctly and must be reset.

Problems and doubts that are easy to build in Android development environment

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.