Frequently asked questions Please write on the users mailing list if you want to contribute.
Q: I'd like to try the newest snapshot build
A: See http://www.nbandroid.org/2011/02/development-builds.html
You can also manually grab a snapshot from http://deadlock.netbeans.org/hudson/job/nbandroid/ and follow the instructions on http://www.nbandroid.org/2011/02/beta-build-of-new-project-support.html
You need to uninstall previous NBandroid release before installing new version, they cannot co-exist.
If you would like to use two different NBandroid releases the easiest thing is probably to install two versions of Netbeans, for example version 6.9 and 7.0.
Q: I have some projects created with the old nbandroid plugin (v. 0.11). How do I import them? Can I keep compatibility with the old nbandroid plugin?
You cannot use old and new plugin at the same time, as they need different build.xml files.
To upgrade project from old to new plugin you must get the old build.xml out of the way. Just open the project using new plugin and it will rename build.xml to unused_old_build.xml to get it out of the way.
The new plugin does not use the 'nbproject' directory at all so you can leave or remove that directory.
If you later on want to go back to old plugin you must restore the old build.xml
Q: Using new plugin I get this warning message "warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds"
A: Nothing to worry about. Just a minor bug in the SDK build scripts, nothing to do with NetBeans. On Mac/Linux you can set the following variable in ~/.bashrc:
export ANT_OPTS=-Dbuild.sysclasspath=false
Q (march 2011): after autoupdate came a warning about something like Ant module could not be loaded and was turned off.
Warning - could not install some modules: org.netbeans.modules.android.ant - The module named org.netbeans.modules.android.core was needed and not found.
A: This is expected and avoids some compatibility problems. See also http://kenai.com/jira/browse/NBANDROID-94 .
Q: My project cannot compile and I cannot see the reason.
A: It is probably hidden. Please check your settings in Tools | Options | Misc | Ant | Verbosity Level. Quiet produces what you see while the default and preferable setting is Normal.
Q: How do I use a library project
A: Create two normal Android projects.
In the library project, add 'android.library=true' to default.properties. It is now a library project.
Lets assume your library project is called MyLib and is located in the same directory as the project using the library.
In project using the library project, add 'android.library.reference.1=../MyLib/' to default.properties, It is now using the other project as a library project.
Q: My library project won't compile
I can compile the project the USES a library fine. If I try to compile the library itself this error comes:
Generating R.java / Manifest.java from the resources... Compiling aidl files into Java classes... /opt/android-sdk-linux_86/tools/ant/lib_rules.xml:126: Reference android.libraries.src not found.
A: This has nothing to do with the plugin right now. It's an issue caused by android itself when creating the projects from the command line. In order to fix it, add these two lines after the and before the closing </project> tag of build.xml:
<setup/> <path id="android.libraries.src"><path refid="project.libraries.src"/></path> <path id="android.libraries.jars"><path refid="project.libraries.jars"/></path> </project>
You will have to do this every time you switch Android platform.
Q: The ADB Log keeps refreshing Using Window | Output | ADB Log gives me the logs of the device. But the content I am looking at keeps disappearing.
A: There is a toggle button with anchor icon on the left side of this window. Turn it off to lock your position in the output and on to scroll automatically when a new entry arrives.
Q: Tell me about other cool features and workarounds which I might have overlooked
A: Here is a list:
- Window | Output | ADB Log.
- If no output comes, try and close the windows pane and reopen it
- Use the anchor icon on the left side. Turn it off to lock your position in the output and on to scroll automatically when a new entry arrives.
- Type a PID (Process number, a la 164) to only view output from that process
- Window | Services (Ctrl-5) shows all connected Android devices.
- Right click on device to take a screen shot
- Open a device to browse the processes (right click on a process to see properties or kill it)





