Friday, December 23, 2011

We're alive

Today I commited a nice patch improving handling of testing projects and fixed dialog selecting target device to show available AVDs in a scroll pane. In addition to that our new build will contain a change that makes it compatible with vanilla installation of NetBeans 6.9.

Thanks for the patches a bug reports.

Saturday, November 19, 2011

Resource references

Yet another missing part of XML editing support is added now. NBAndroid plugin now reads content of generated file and offers its elements when editing an attribute value that contains reference. This poses some limitations (no system wide resources yet and the project must be built to get recent additions) though it is better than no support.  

This was much simpler for me thanks to great advises how to use Java sources support.

Monday, November 14, 2011

Another shot at XML editor support

I made a couple of changes in XML editing support yesterday when I arrived to Antwerp for Devoxx. They fix some annoying mistakes like android:id or android:layout_width attributes often missing in code completion when editing layouts. The change was just pushed to our Auto Update. Enjoy it.

Thursday, November 10, 2011

NBAndroid is heading to Devoxx

I am heading to Devoxx in Antwerp, Belgium next week - November 14-18. There is a good number of sessions about Android including some related to tools. Those include

If you want to meet, discuss something, or just say "hi", sent a note and we can arrange something. Pinging @nb_android Twitter account can be the simplest way how to contact me and let others know. There are some other means on contacts page too.

Friday, October 28, 2011

How to attach sources for SDK classes?

Ability to see SDK sources was one of the requests files in our JIRA for a while. I am glad to announce that is ready now. You have to find these sources somewhere because Android SDK does not ship with them. For example Mike Foster wrote a script long ago. The idea is to clone git repository with Android sources and collect the sources from various locations there. Once you have it extract them into $ANDROID_SDK/platforms/<platform-dir>/sources folder where platform is one of android-X directories. Substitute API level of your project for X.

For those interested in details there is a long discussion in related bug report from Eclipse users.

Synch with latest Android SDK

The latest updates of Android SDK tools (r14 and quickly following r15) brought some significant changes. Those had to be reflected in our plugin and the change is alive now.

Please take a careful look at SDK Tools page. Your projects need to be updated using android update project command. As a result you will see that and files are replaced with and The plugin will run this update if you open the project customizer (right on project node and select Properties menu item) close it with OK. More significant changes are under the hood. Android team reworked the way how projects are build. The build should be much faster especially if you use Android library projects. And while Xav admits that the old implementation of libraries was fragile in Eclipse I can add that it was not great for NetBeans either. Our concerns are gone now and updated version is nicer.

Friday, August 12, 2011

Bugfixes pushed continually

There were several reports of problems with initialization of Android plugin in NetBeans BugZilla. Thanks to our friends in NetBeans team an email about this ended in my mailbox. Fix is on the way to the update center.
The problem affected people who (re)moved Adroid SDK from a location specified in NetBeans. While the original code was OK in the past there was a small change in SDK libraries (RuntimeException is thrown where IllegalArgumentException was used). It is covered with a test now to avoid surprises like this.

Did I write that the only way how to convince to contribute larger chunks of functionality again is to sent a donation? I like it that there are 10.000+ downloads but this doesn't justify my time spent on this. Keep in mind that Eclipse plugin is developed by Googlers and we do not have any sponsor like this.

Thursday, August 4, 2011

LogCat improvements

Another update was just pushed to our AutoUpdate center. Christian finished his next round of changes in LogCat viewer:

  • Stack trace lines are clickable now.
  • There is a better support if you use more devices during development
  • Tabs with their filter settings are persisted across sessions
  • There are some other UI changes to make it look nicer.
Very nice stuff, indeed. Thanks.

Saturday, July 30, 2011

How to fix broken communication with devices?

I spent some time doing actual development using NBAndroid rather than developing the plugin itself and it gave me a lot of ideas. Two most important areas that need attention are resource editing and execution/debugging support. I am very glad that Christian takes care of the latter and more of his improvements are on the way. LogCat is really critical tool when you are debugging and that's why we need to make it better. Another small improvement in that area is ability to restart Android Debug Bridge that is responsible for communication between IDE and devices. This is meant as a workaround for some strange cases when the connection breaks. Just go to Services window and use the action from a context menu of Android Devices node (of course you know about that node because you have read the last post).

Sunday, July 24, 2011

Tip: how to control attached device

Services tab (Ctrl+5) of the IDE contains one well hidden feature of NBAndroid plugin. There is a node showing all devices known to IDE. In addition to that you can also see processes running on these devices.

There are also a few actions available for devices and processes. Properties tab (Ctrl+Shift+7) shows various properties of both and gives you a chance to modify some aspects of the device state: voice and data network and their parameters. Processes offer possibility to start debugging as mentioned in post about debugging or simple to kill some tasks (be careful). You can also get snapshot from a device.

Sunday, July 17, 2011

Updated to latest tools version

Google recently released an update of SDK tools (revision 12). Enjoy it when using NBAndroid too. Where we need to use some bundled library in our plugins we use the same set of libraries now. This means we have all recent bugfixes and our plugin should be compatible with uptodate installation of the SDK.

Thursday, July 14, 2011

Tuning XML editors

Our XML editing support just received a nice set of patches. It offers more complete set of attributes now when editing layout files. And there is even better change. It gives you hints for some of the values. It knows about attributes that has to have one of the enumerated values and/or attributes specifying dimensions.

There are several more types of attribute values and their support can be added in the near future. Given the tedious nature of layout file editing it sounds to me like a really nice improvement. General project infrastructure is there for a longer time and it works as assumed but this is going to be a productivity booster. And think about the donation button on the right side of this blog.

Thursday, June 30, 2011

.apk files handling

You've asked for a feature and we have it ready now: it is possible to select .apk file (for example in Files view) and install it on a device. It shares a lot of code with Run action so it wasn't too difficult to implement this.

It is pushed to our autoupdate center so you can get all recently announced changes just by installing udpates.

Sunday, June 26, 2011

More resources recognized in editor

I mentioned it a while ago that we have a code completion support for various XML files used in Android projects. You can find a reference in a features page.

Now this will be more complete as I added first batch of code changes to help you edit resource files. I am working on a support to edit strings, styles, color, drawables, lists and similar. As usually it is commited into our repository and thus accessible from our continuous build and I will push the changes to our autoupdate soon.

Of course this is all limited by the fact that this is my non-profitable spare time project. Features can be added slowly by me or by some donations (thanks Baldur!). You can help too by sending your feedback and sharing the word. Obviously you can use the Donate button on a right bar too. It would be appreciated. Enjoy the plugin.

Friday, June 17, 2011

Project Libraries simpler

Android Library projects allow you to share code or resources in more application. Up to now it was possible to set it up in and work with these libraries in our NetBeans but you had to do all the modifications manually. Of course this raised some questions and apparently was difficult for some users. Now this is much simpler and you can use project customizer to update your project.

There are two sides: some projects can be marked as a library (the checkbox at the top of customizer page will be selected). Application projects can then reference these libraries and the code and resources from the libraries will be included in them. The table shows all libraries references and enables their editing.

Possibly the next step is to add some UI for JAR libraries too to make it more obvious how to use code from external JARs.

Monday, June 13, 2011

Automated selection of target device

As you could see the project customizer contained a UI to enable automatic selection of device when an application is executed. This UI was not functional for a while bit it is fixed now. There were two bug reports related to this topic so I decided this is the right thing to do now.

In the meantime I also played a bit with automation of a build publishing to make it simpler to publish build output to our update center. It will be simpler to make an update in the future.

Thursday, June 2, 2011

Attach debugger

Yet another feature is added to nbandroid - ability to attach debugger to a running process. And once again we have to thank Christian for this functionality.

There are two ways how to activate this. First is to go to Services tab and navigate to a node of a process that you want to debug. Then use Attach debugger action from context menu. The second option is to use Debug | Attach ... menu item from main menu. Android debugger has its own support registered here.

There are few more minor changes in this small update and more will be coming.

Sunday, May 29, 2011

Building signed packages

The Android system requires that all application be digitally signed as described here and here. During the development they can be signed with debug key that has known values and password so the developer does not need to be asked for details how to do this step.

You have to have your own private key and perform the build using this key before you publish your application though. So far the support for such a build was missing in nbandroid but this has changed. The latest snapshot adds a wizard hooked to an action available on project context menu to export signed application package. Values from project's properties files are used to assist you. Namely and key.alias are two basic properties to determine the location of keystore and name of the key used to sign the application. You can try it using the bits from continuous build and it will propagate to the stable update center in a few days if no bugs are reported.

Saturday, May 21, 2011

Version 1.7. Let's remove BETA label

New NBM archive is now uploaded to our project hosting. Or look for the instructions in Install wiki page. You can see that the BETA label is removed now. I believe that there are enough users now who are OK with the plugin to declare it stable.

Most of the changes since last version deal with XML editing support mentioned here and here. There is also an improved LogCat module and our projects work correctly if they refer to a library project referencing another library. Many thanks for these contributions.

I'm going to remove the old (0.11) version from the download area soon and there will be a different URL for an autoupdate center. That way users of old version will not be forced to upgrade though I want to strongly encourage them to switch. The old version will not receive any updates in the future.

As always send your feedback. Links are in contacts page.

Thursday, May 19, 2011

Code donations

Excellent news! We have some code donations to improve the functionality. Many thanks to Christian Fischer who is fixing a classpath problem when nested libraries are used and problems with general project setup. Part of that work was just commited and part is being discussed.

The second one comes from mikro and improves LogCat viewer. This is also very cool - the whole support there was created by non-core NBAndroid developers and it is great to see how the community can help.

I know that it is my turn to evaluate and integrate them now. Please be patient. And BTW more complete list of our contributors is in our wiki.

Saturday, May 14, 2011

XML editor work continued

Few more changes in layout editing support were pushed to our repository. At the moment the module offers you hints about possible tag names and their attributes (with a known limitations that only views and view groups from android.jar class are considered). Again there is a big space for improvements in this area but still this can make development a little bit easier.

Wednesday, May 11, 2011


I've added small section with important links to this blog layout. There is one link to our Wiki where you will find some basic documentation discussing how to install and start with development.

The second one leads to JIRA bug tracker. Please use this for your bug reports. Create an account there and file your bugs. Blog comments are a bad place to discuss bugs. I cannot reply to you directly in many cases (most readers have non-public e-mails in their profile) and it does not work well to track bugs this way.

Note that there are also mailing lists like and forums for more general discussion. Both are accessible through the third link that points to our code hosting site at

Sunday, May 1, 2011

More improvements in XML editing

I decided to take another step and improve XML editing little bit. You can see that code completion for AndroidManifest.xml now shows documentation for suggested tag names.

I am going to add similar support for attribute names and possibly values though this will depend on NetBeans bug #198223. You can vote for it and hopefully it will be integrated into next NetBeans version.

On a similar subject: XML files describing layouts can get some coding support too. First changes are already there. A subset of available attribute names is shown in code completion window. Full set of attributes, tag names and other items should follow.

As usually everything is available from our continuous build first.

Monday, April 25, 2011

Easier AndroidManifest.xml editing

This is a feature that worked in older version but we broke it temporarily during the project support rewrite. The good news is that XML completion in AndroidManifest.xml files is working again in our development build. It suggests and complete tag and attribute names.

Saturday, April 16, 2011

Initial support for test projects

It's been a while since last update so I decided to share recent changes. The most visible improvement is support for testing projects. There is a lot of things missing in this area but at least you can run all tests in this project now.

Due to a technical difficulties we have to build a version of a testrunner that binds specifically to certain NetBeans versions. As a result there are three NBMs of Android Test Runner module. One works with NetBeans 6.9 the second with 6.9.1 and the last will work with 7.0 and future builds (I tested it with NetBeans 7.0RC2). When installing from our continuous build select 'Android' and one of the 'Android Test Runner for NetBeans x.y'. Similarly if you want to install from ZIP archive select all NBM files but those that do not match your IDE version. This should not be hard and AutoUpdate support will not allow you to install the version that is not compatible with your version in next step anyway.

The latest build tagged as 1.5beta is now available for download from Kenai hosting.

Sunday, April 10, 2011

Fixing launch action

There is some delay in general progress these days because I'm busy with other projects. But I still plan to create at least basic testing support and make it available soon. If everything goes well I'll be able to create a new update in a week or two. Stay tuned.

In the meantime I did some experiments and worked with nbandroid as a user. The result is couple of bugs discovered and a few ideas what to do next. And example is a fix for launch action that asked for target device even if the build failed. This is integrated now and more small fixes like this one can follow.

Tuesday, March 29, 2011

Testing support

The next theme is to add support for Android testing. Quick summary of what is working now in the latest snapshots:
  • There is a wizard to create test project (or you can open a test project created from command line)
  • Test action is enabled for these projects and it runs tests on currently available device. Only the text output is visible.
As a next step I'd like to add better output for test runs. And execution of individual tests. Templates for test cases can be added too. I am not sure if we need ability to choose between JUnit test execution and run on device. A user feedback on this can help. Mail to users at or post to our forums.

Sunday, March 20, 2011

Debugging is back in new release

Good news. We have debugging support again! Thanks Tom for this contribution.

Together with other bugfixes and improvements this is enough changes to prepare a new release. Grab it from nbandroid download area on hosting. 1.3beta is the latest and greatest at the moment but always look if there is a newer version published.

I've also made a few changes in our wiki (mostly to Intro page) and any contribution there are welcomed. Jacob already started FAQ page. Thanks for that. My next plan is to add basic support for test projects and test execution and then I will make this a regular release and take down the old version.

Thursday, March 10, 2011

Improved migration

The traffic in our JIRA increased in last weeks and there are some new bugfixes. At the moment these are available from continuous build and I'm going to upload NBMs to soon.
  • Upgrade path is again a little bit smoother. If you used older version of nbandroid plugin (0.11) and updated it to 1.x the IDE will tell you that two modules must be disabled: and You will need to confirm the disabling. This fixes incompatibility between those old modules that are removed from new version and caused problems on startup or when opening Java platform manager. Related bug report is here.
  • More importantly when an old nbandroid project is opened the new module tries to update it to new layout and toolset. Link to JIRA bug is NBANDROID-99 if you want to add comments.
  • Build is improved now: library projects are built using correct target name (ant compile) and in addition 'clean and build' action works too.
  • You can see documentation for SDK classes when editing your sources in Java editor.
Important note: previous post about development builds had a link pointing to last successful build when you really want to get last stable build (one that passes all tests). The entry is fixed now to point to Please make sure that you update your configuration if you are using it.

And again there is more in the queue for next releases. Feedback is always welcomed.

Saturday, March 5, 2011

Time for new beta release

There are some bugfixes and new goodies so let's share what we have.

Brief summary of changes since the first beta build two weeks ago:
  • The initial setup was difficult to do for some people and a few changes were targeted to make it simpler and less error-prone.
  • I believe that the classpath is now mostly correct as the module recognizes of Android project on another Android library project(s) and is aware of libraries used for compilation in libs directory.
  • UI hierarchy in project explorer is updated to show more important files and also it displays JAR from Android platform. See the picture.
How to get the new stuff? Download 1.1beta NBMs from our project hosting at and install the same way as you have installed previous beta. It is described in previous beta announcement and you will use the same steps. Of course those who set up AutoUpdate center pointing to our continuous build will get everything too. Once again user feedback is really important. Previous posts have all the instructions where are our mailing lists or forums and where to file bugs into our JIRA.

Sunday, February 27, 2011

Development builds

We have continuous build set up now. It means that the latest bug fixes and improvements are available as soon as they are pushed to main repository and build passes with all existing tests. If you think you are going to try these just add or update your Update Center URL to

There were few bugfixes added during the last week and some small changes in the project UI to make it simpler to detect cases when the project needs to be updated. The idea is to support project generated using SDK tools directly - just open them using open project dialog and it should be possible to edit build and deploy. Generated build.xml is used for building then and we will add more Android specific features in the future.

I hope there will be just one extra step for simple projects previously developed in Eclipse: open project customizer and click OK after checking that there is a correct build target selected (if there are no build targets you will have to specify SDK location in Options dialog).

Surely there are many things missing and you can send your feedback to a users mailing list of this project or submit a bug/RFE at our JIRA bug tracking system or post to a forum. The next priorities will be set according to this input.

Sunday, February 20, 2011

Beta build of new project support

After a long hiatus I've published an update for this project that brings major overhaul. Main goal is to support project layout and build system defined by Android SDK (see bug #65). With the updated NBAndroid you can use a project created with Android SDK in NetBeans and vice versa. NetBeans project support now expects the same project layout and uses the same set of tools for building.

Installation and configuration:
  1. Download modules from project download area and un-zip them.
  2. Open plugin manager in NetBeans (go to Tools | Plugins) and add all 10 downloaded modules: go to Downloaded tab and add them using file chooser displayed when you click on Add plugins. Install these plugins with Install button on the same tab. You have to accept license and the fact that the set of NBMs is not signed. NetBeans 6.9 or newer is required.
  3. Set the location of Android SDK in Tools | Options | Miscellaneous | Android. You need to select your android-sdk-linux_86 (or whatever is the name of the SDK folder on your OS of choice). You can skip this step you plan to open a project that is created with this SDK. NBAndroid will try to read to location of SDK from your project.

There is no new AutoUpdate site for this new version yet and the old AutoUpdate URL still points to older version. This will change once the new support becomes more stable.

Quick start:
  • You can create a new project or open existing project. To create a new project you have to select a build target that you will build against.
  • Source file editing is supposed to work as well as building.
  • You can run your application and the module will ask whether you want to deploy it to an already running emulator or to start a new one. There is no UI to create/update/delete existing AVDs yet.
  • Compatibility with older projects created with previous version of nbandroid is not solved (and very likely will not be addressed in the future). I guess the simplest way is to remove nbproject directory in your project and create new Android project here (either using new nbandroid or with SDK).

There is neither debugging support nor support for testing project and many more things. Bear in mind that there will be rough sides but your feedback can help to move this project forward. Simply said I'm only going to commit some time if there is an interest. Contributions are welcomed. I'd like to turn these short comments into wiki topics on project site and a help with that would be nice (including some screenshots).

Good luck.