Build an android development environment in netbeans

Source: Internet
Author: User
Tags netbeans
1. Install the nbaandroid plug-in

In almost all the tutorials I have found, it is said that in netbeans,

  • Open tools> plugins> setting)
  • Click Add button to add this link http://kenai.com/downloads/nbandroid/updatecenter/updates.xml, change the name, OK.

But after I tried it, I found that there was no way to update it. Why? Here we will understand.

This is because the link to the update center is invalid.

  • Download the latest ZIP file from the http://kenai.com/projects/nbandroid/downloads.
  • Decompress the downloaded ZIP file and openTools> plugins> downloaded.
  • ClickAdd pluginsSelect All The NBMS files in the extracted files.

(If your netbeans version is 7.2 or later, cancel the org-netbeans-modules-android-testrunner69.nbm and org-netbeans-modules-android-testrunner691.nbm) then click Install, click Next as prompted, accept the licence, and click Continue (ignore warnings about unsigned plugin ). so far, the plug-in has been successfully imported.

Next, we will install the android SDK.

* *****

"Warning-some modules cannot be installed: Android test runner for netbeans 7.0 +-the module named org. netbeans. modules. GSF. testrunner is required, but not found ."

Solution:

Netbeans-> Tools-> plug-ins-> Settings-> Add

Name: nbandroidurl: http://nbandroid.org/release72/updates/updates.xml

Click OK, go to the Update tab, and select "Install and restart android.

2. Set the android SDK path

Probably because of the latest update of the nbandroid plug-in, I found that the current configuration process has omitted the step of adding the Google Android platform to netbeans. Therefore, you can set the local path of the android SDK as follows:

  • Open tools> Options> Android Tab)
  • Select your local Android SDK path, and click OK. The configuration is complete.
3. Create AVD

AVD (Android Virtual Device) is a virtual device running on Android. It is recognized by the android simulator. To run a created Android program, you must create an AVD. You can configure many running projects (from Baidu encyclopedia) on each AVD ). To create an AVD in netbeans, follow these steps:

  • Open tools> Android SDK and AVD Manager> Virtual Devices. Wait a moment and the following page appears:
  • Click the new button. The following window is displayed. After the options are set, click Create AVD. Wait until the creation is successful.

        

4. Create an android Project

So far, Environment configuration has been completed. Now you can create an android project in your netbeans as follows:

  • Create a project, select android on the left, android on the right, and next.
  • Enter the project name, package name, And activitiy name, select the corresponding SDK version, and click Finish.
  • As a test, we will not make any changes to the Code. Right-click the project and run it. Wait for a while (the android simulator is quite slow). The following interface is displayed, OK, success

Related Article

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.