Structural Analysis and Design of Foundations: A Comprehensive Handbook for S...
Install Android SDK in NetBeans
1. Installing Android SDK on NetBeans
by GregRJacobs | Jul 30, 2011 | Android, Java, Languages, Linux, Platforms, Programming, Windows | 62 Comments
In this article we are going to focus on installing the Android SDK on the NetBeans Integrated Development Environment (IDE). Normally
people would use eclipse as their development environment when programming for the OS platform asandroid.com offers the instructions
for doing it this way. We are going to stray from this and use NetBeans as it can also be used for a variety of different languages and has a
cleaner interface. To start out we need to make sure that NetBeans is installed and we will need to note what version we are using. After
NetBeans is installed we can begin configuring the environment for Android.
2. The first thing we are going to want to do is install the Android SDK on our computers. Android.com has made this easier for use by offering
Windows users an executable file to download and run. After we have downloaded the application we are going to need to locate it. After it
has been located we will double click on the executable and the first screen should appear. Below are some screen shots of the options I
chose while walking through the install:
3.
4.
5. After this installation has been completed we can now proceed to start up NetBeans. After NetBeans is open we are going to click on the
menu bar and go toOptions -> Plugins. This screen is used for adding plugins that can improve the IDE itself or help the way you code. In
this instance we are wanting to add the Plugin nAndroid so we can start developing some Android applications in NetBeans. This is the first
screen you will be presented with when the plugins option is chosen:
We want to navigate to the settings tab where we will want to go to the Add button and click it. We will be presented with a screen to add
the name of the new plugin and the source of the plugin. At the end of this the screen should look something along the lines of this:
6. We can then proceed to check the box that says Check for Updates Automatically. This is so we don’t have to manually search for an
update when there is one. After that is complete we can press OK and see that the plugin has been added to the list but not installed yet.
For that to happen we need to click on the tab that says “Available Plugins“. After we are there we can utilize the search box on the right
hand side by typing “Android” into it. It should bring up four options of which we will only need two. These two will be “Android” and
“Android Test Runner For NetBeans 7” as that is the version of NetBeans we are using. After that the following screen shots will go through
the install of the product with you after you press the install button:
7.
8.
9. After this is done we only have one thing left to do and that is hook in the Android SDK we downloaded into the NetBeans environment.
This can be done by clicking on “Tools” in the menu bar and choosing “Options” at the very bottom. We then want to navigate to
“Miscellaneous” where we will see an “Android” tab in the mix. Click on it and we will be presented with the following screen:
10. We need to click browse and then locate the Android SDK. Once found remember the path that the Android SDK is located at as we will
need to use this once more before the end of this tutorial. Aftr you have delved into the Android SDK and selected the folder we can then
press OK. Afterwards your screen with the location to the SDK should look like this:
We now need to go to our windows explorer, keeping in mind the path the the SDK and find the SDK one more time. After it has been found
we will want to double click on the application executable named “SDK Manager”. Once it is open we will want to select all boxes in the
“Android Repository” and “Third Party Add-Ons” that will be located under “Available Packages“.Once this is done we can then press
“Install Selected” and wait for them to be done.
11. After the packages have installed you have completed all the requirements necessary to develop an Android application within NetBeans.
This tutorial will be helpful if you are interested in Android Development and the new 201 Development series coming to Binary Wasteland
in the future. Until the next tutorial, Happy Hacking!
Update
It has been determined people were having trouble getting the NetBeans and Android SDK combo to work and it is because one key issue
wasn’t mentioned. When we download the Android SDK we need to add the SDK to a directory that will not have any spaces. After this is
12. done we need to add that directory to the System Variables under Path. To do this we need to click the start menu, navigate to computer,
right click it and pick properties. You then need to clickAdvanced System Setting on the right hand side of the screen. You will then be
presented with the following screen:
We then need to then click Environmental Variables and we will then get the following screen:
13. We will want to scroll down in System Variables to the Path variable and click the Edit button and we will get this following screen:
14. We will want to navigate to the end of the line and if there is not a “;” at the end then add one. After that we need to add the path to the
Android SDK and more specifically the tools folder as shown above. We will need to change the reference in NetBeans to the Android
SDK. After this is done you should be able to run the program and the Android SDK will start up and load your program. Any furthur
troubles leave a comment below and we will be sure to help! Until next time, Happy Hacking!
I have followed all the steps mention, double checked it, and it looks exactly as you have described.
I still can not sue it, in NETBEANS when I start a new project, I select Android from the Categories, and I select Android Project
from projects list. I click next and I have to fill in Name and Location. I fill in all parameters and I get an error telling me that "
Package name is not valid" I have set the package name to "First Android".
What is going on.
15. Torbjorn Zetterlund Greg R. Jacobs • 4 years ago
that help me through that issue - after the new project was created, I have an error inMainActivity.java file - I got the same
problem when I imported a sample project - same problem.
16. It telling me that package R does not exist - when i check the hints it tells me Add import for Android.R, is this an issue
with finding the Android library or is there a library I have not downloaded correctly.
Introduction
NBAndroid provides support for of Android applications development cycle. Its functionality covers various aspects of Android developme
17. Core Android SDK support.
Project support - works with Android SDK projects. Edit, build, and run or debug cycle is supported using emulators or real devices.
LogCat viewer integrated into IDE is crucial when tracing what's going on while your code is running on device.
Improved editors for Android XML files.
GUI layout preview. This is initial version aiming to give you possibility to design UI more quickly in the IDE without turnaround to rede
NBAndroid Extensions - set of productivity enhancements provided as paid service to support the plugin development.
Support for Android projects using new Gradle build system with NBAndroid Extensions.
[ You have to be logged in to be able to comment.]
User Comments
How To Install Android Package on Netbeans
Try below for installation
http://doniphantom.com/konfigurasi-android-sdk-di-netbeans.html
Posted by daralgeldi on Nov 24, 2014
Re: Log cat
I do know the plug in has the filtering button on the logcatwindow.but the option for filtering is poor.
I means thatI want to see justinfo from my app when I print out it with system.out.printor when I dump the stack with the er.printstacktrace
With the Logcat of eclipse Icould filter by application name.
but go to netbean,I didn'tsee that options.
I hate the eclipse way to read code,and it run slow too.
I love the netbean way, it looks smarter.(thoughtit takes alotof time to run android app).
The supportfor xml still poor.wish it could supportxml layout like eclipse does.(link between resource name and xml element)
Posted by harunaga on May 20, 2013
Re: Log cat
To harunaga:obviouslythere is possibilityto filter logcatmessages.Use top button from the button bar on the left side oflogcat win dow to create a filter.
Posted by rkubacki on May 03, 2013
Log cat
18. Log cat has no option for filtering out put info from my app.
So I get a lot of redundantinfo. or whatI should do to justsee the out put from my app from sdtout and std err ???
Posted by harunaga on May 03, 2013
support for ndk
Hi. I prefer use netbeans than eclipse due to the delay of eclipse.butthis plug in seems to notsupportndk. I can not see the folder jni in the projectview.
The supportfor xml still poor.the plug in didn't give the feeling like the feeling of using android in eclipse.
But I still like reading code in netbeans.
Posted by harunaga on Apr 26, 2013
re: Supported android SDK version
RecentAndroid SDKs are supported.There is sometimes a shortdelay but at the momentthe current one works properly (r16 IIRC).
As for the downloads:the latter one with the timestamp is newer.It's better to use AUC.
Posted by rkubacki on Jan 27,2012
Supported android SDK version
Anybody knows supported android version for kenai ?
(in other words,what are the andorid sdk version kenai can handle)
Which one is latest?
http://kenai.com/projects/nbandroid/downloads/download/v1.5beta/nbandroid-1.5beta.zip
or
http://kenai.com/projects/nbandroid/downloads/download/archives/nbandroid-dev-2011-08-12_15-41-04.zip
Posted by jaisondaniel on Aug 16, 2011
Configure Android in Netbeans
19. This tutorial will help you to set up Android SDK in Netbeans, for this I have used Netbeans 7.0. I you have not installed netbeans just go to this
link and get this installed right now.
Once you have done this installation just follow the below simple steps to configure Android SDK to it.
Step 1: Configure Android plugin in Netbeans
Step 2: Configure Android SDK in Netbeans
Configure Android plugin in Netbeans
1. Open Netbeans and go to Tools -> Plugins -> Settings, now you can see the below window and click Add button at the bottom right. It
will take you to another window.
20. 2. Give any provider name you wish but the URL given
herehttp://kenai.com/projects/nbandroid/downloads/download/updatecenter/updates.xml and click OK.
It will check for some updates and add Android to the list.
3. Now go to Available plugins tab you can see the Name provided above (“Android”) in the list as shown below.
Click the check box in the left and select install at the bottom. We are about to install Android plugin into Netbeans, just go ahead and
click next, accept the license agreement and proceed; you could see the plugin is being downloaded.
Then click Continue in Verify certificate screen, now you plugin should have got installed now click Finish.
21. 4. We can see increase in number of options at the top as well in Tools link. Then we are correct we have finally configured Android plugin
into Netbeans.
Configure Android SDK in Netbeans
If you have not configured Android SDK, just go to this link and configure it first.
1. Once done with the above steps, go to Tools -> Android SDK and AVD Manager, a pop up will appear click OK, below screen will
appear.
22. 2. Select Browse and locate Android SDK path as shown below and Open and OK in the previous window. Now you have configured
Android SDK in Netbeans. To validate your configuration proceed with next step.
23. 3. Go to Tools -> Android SDK and AVD Manager, now you could see a different window, as shown below. It indicates that SDK platform
corresponding to different OS versions has been installed. Other packages can be downloaded and installed based on developer’s choice
by selecting the check box and installing packages by using the bottom.Finally we have come to the end of Android SDK configuration in
Netbeans, next post will help you to run a sample program in Netbeans.
24. Thus setting up Android in Netbeans is finished.. Now go ahead and start your development.
Hello World Android project in Netbeans
25. To proceed with follow this link and configure Android SDK in Netbeans first.
1. Once Android SDK is configured, open Netbeans, go to File -> New Project and create New Android Project as shown below.
2. Select Next and proceed , fill in the details requested.
Project Name: This name is the identifier of your application and will be displayed everywhere your application is being used. For instance your
application will be displayed in this name in Google market. So name it with care.
Package Name: This follows the same conventions like Java package. Many developers does mistake here by using a single identifier (HelloWorld) or using
two identifiers separated by space(Hello World) but this is not the way to name a Java package.
If you do so you will get the below error message. Package name should have two identifiers separated by periods(.)
Example: com.helloworld
26. So if you follow the correct package naming convention you will be able to proceed as shown below.
Target platform: It is against which you are going to compile your code, chose as you wish.
27. 3. So simple as such, now click Finish. Now select your project either press F6 or run button at the top to execute your project. Emulator window will open to
display “Hello World, MainActivity “.
Thus we have created Hello world application in Netbeans...