In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/02 Report--
This article is about how to build an Eclipse Android development and configuration environment. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1. Download Android SDK
Http://code.google.com/android/download.html
This is the official website, after entering, follow the process and choose the SDK package suitable for your platform (here is Windows) to download.
Download it and decompress it directly and you can use it.
To use SDK's tools directly in the DOS console, you can add the directory of SDK to the path environment variable of Windows:
Right-click my computer on the desktop, and click Properties > Advanced > Environment variables.
Double-click the Path item in the system variable to add the full path to the tools directory in Android SDK.
two。 Download JDK6
Http://java.sun.com/javase/downloads/index.jsp
Download and install the Java development package. (I downloaded and installed this before, and jdk updates automatically every time.)
3. Download Eclipse3.4.1
Http://www.eclipse.org/downloads/
Select "Eclipse Classic3.4.1" in the "Eclipse Packages" tab to download. This is the current version of *.
For Eclipse, it can be used after direct decompression. (I have myeclipse 6.5would be fine.)
4 download the Android ADT plug-in for Eclipse
Install the Eclipse plug-in (ADT)
To download and install the ADT plug-in, follow the steps that Google provides to developers:
1. Start Eclipse, then select "Help" > "Software Updates" > "Find and Insta ll"
two。 In the dialog that appears, select "Search for new features to insta ll" and click "New"
3. Click "New Remote Site"
4. In the results dialog box, type a name for the remote site (for example: Android Plugin) and type
This URL serves as its URL:
Https://dl-ssl.google.com/android/eclipse/
Click OK.
5. You should now see the new site loaded into the search list (and selected) and click "Finish".
6. In the later search results dialog box, select "Android Plugin" > "Developer Tools" check box
Box. This will select the "Android Developer Tools" and "Android Editors" features.
The Android Editors feature is optional, but recommended.
Now click "Next"
7. Read the license agreement, select "Accept terms of th license agreement" and click "Next"
8. Click "Finish"
9. The ADT plug-in is not signed; in short, you can click "Insta ll All" to accept the installation
10. Restart Eclipse
11. After reboot, update your Eclipse configuration to point to the SDK directory:
a. Select "Window" > "Preferences" to open the configuration panel. (Mac OS
X: "Eclipse" > "Preferences")
b. Select "Android" from the left panel
c. For "SDK Location" in the main panel, click "Browse" and select the SDK directory location
d. Click "Apply", then click "OK"
* you can create a project
Create an Android project
After setting up the development environment, let's create a Hello World project to experience Android development.
1 Select [File] > [New] > [Project]
2 Select [Android] > [Android Project], and click [Next]
3 create a new Android project
Project name (store the directory name of the project on the computer): HelloWorld
Package name (package name, please refer to Java related concepts): com.china.hello
Activity name (class name of the UI interface window, inherited from Activity): HelloChina
Application name (title name of the application): test Android
Note: when creating a new Android project, the Target name selected in the Build Target must be the same as your list of existing Android virtual devices, otherwise you must always
You start it manually.
Such an Android project has been created.
In the Package Explorer window, select [src] > [com.china.hello] > [HelloChina.java] file, and edit the code:
Package com.china.hello; import android.app.Activity; import android.os.Bundle; import android.widget.TextView; public class HelloChina extends Activity {/ * * Called when the activity is first created. * / @ Override public void onCreate (Bundle saveInstanceState) {super.onCreate (saveInstanceState); / / setContentView (R.layout.main); TextView tv = new TextView (this); tv.setText ("helloWorld"); setContentView (tv);}}
Run the project
Select "Android Application" in the "Run As" window, and the emulator window will appear after a while:
Click the "MENU" button in the simulator to unlock it, and our program will come out.
But when I ran my project for the first time, the following happened
No compatible targets were found Do you wish to an add new Android Virtual Device
Solution:
First of all, consider adding our full path to the tools directory in Android SDK to path.
Eclipse Android development configuration is complete.
Thank you for reading! This is the end of the article on "how to build an Eclipse Android development and configuration environment". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.