Author Topic: Anyone use Netbeans?  (Read 2652 times)

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Anyone use Netbeans?
« on: September 12, 2010, 01:51:09 am »
For no other reason than I really hate to learn a new IDE, I've been using Netbeans to develop for Android (using the NBAndroid plug-in) rather than Eclipse.  There was one issue with audio that I noticed, caused by Netbeans zipping the contents of the res/raw directory rather than leaving them uncompressed.  This was easily fixed by adding a few lines to the build.xml file.  I have compiled a number of simple non jPCT-AE programs and successfully run them on my emulator's Droid X AVD (Android 2.1 update 1, WVGA8554, 16GB virtual sdcard).

Unfortunately, I am not having any luck with jPCT-AE.  I've tried both the Hello World from the wiki as well as the Demo.  When I run either of them, with or without the build.xml changes, the emulator's screen goes black for a split second then returns to the home screen.  Anyone have some suggestions for me to try? (I may have to give in and switch to Eclipse..).  Is there a log file for the emulator that gets generated or some other way to see if errors occurred (nothing appears in the Netbeans output window, because the program builds successfully and gets sent to the emulator without problems)

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Anyone use Netbeans?
« Reply #1 on: September 12, 2010, 01:59:55 am »
I should point out that running these apk's on my actual Droid X behaves the same way as in the emulator, which would indicate there is a problem with how I am creating them, rather than a problem with the emulator.

Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Anyone use Netbeans?
« Reply #2 on: September 12, 2010, 02:39:09 am »
my short answer is switch to eclipse ;) I used to use netbeans and developed karga in netbeans and later switched to eclipse for job obligations. I must say I'm quite impressed.
you can see logs in eclipse but that's not ide spesific.
Code: [Select]
tools/adb -logcatwill also show it. also there are applications in market to see logs in device.
netbeans may also have a log window. in eclipse console output (which displays app. install status and similar) ang log view are independent.

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Anyone use Netbeans?
« Reply #3 on: September 12, 2010, 03:16:13 am »
Ok, the switch to Eclipse isn't going so well either.  I installed it, and went to add the ADT plug-in using the procedure outlined here.  However, after it asks me if I want to trust the digital signature, installation fails with the error message:
Quote
An error occurred while installing the items
  session context was:(profile=PlatformProfile, phase=org.eclipse.equinox.internal.provisional.p2.engine.phases.Install, operand=null --> [R]org.eclipse.pde 3.4.100.v201002111343, action=org.eclipse.equinox.internal.p2.touchpoint.eclipse.actions.InstallBundleAction).
  Cannot connect to keystore.
  This trust engine is read only.
  The artifact file for osgi.bundle,org.eclipse.pde,3.4.100.v201002111343 was not found.

Some googling seems to indicate that the problem is that by default, the Eclipse which is packaged with Ubuntu runs with the GCJ JVM and not the JVM supplied by Sun Microsystems even if you have installed the Sun Microsystems version.  Every single reference I can find says the same thing:
Quote
edit the /etc/eclipse/java_home file and add the following line at the top:
/usr/lib/jvm/java-6-sun

Problem is, there is no /etc/eclipse directory, so no java_home file to edit.  I'm guessing some really-smart Eclipse developer switched things around in a recent version, making the hundreds of existing "how to's" on the subject useless.  Has anyone recently installed Eclipse and the ADT plugin on Ubuntu?

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Anyone use Netbeans?
« Reply #4 on: September 12, 2010, 03:21:30 am »
Haha, and don't say short answer is switch to Windows...

Offline raft

  • quad
  • ******
  • Posts: 1966
    • View Profile
    • http://www.aptalkarga.com
Re: Anyone use Netbeans?
« Reply #5 on: September 12, 2010, 03:31:10 am »
I'm an ubuntu user too. but I never used a packaged one, and never experienced such problems. download eclipse from its site. it's just a compressed archieve. will work wherever you extract it. same applies to windows version.

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: Anyone use Netbeans?
« Reply #6 on: September 12, 2010, 03:57:32 am »
That did the trick.  Was able to install the ADT plugin without a hitch, then copy/paste from my Netbeans project.  Runs on both emulator and actual device.

As a side note, it seems rather odd to me that the Android SDK is not better supported on Netbeans.  I know more people use Eclipse, but Netbeans is also widely used.  Oh well, I'll just have to use Eclipse for my Android projects, and Netbeans for everything else (no point in trying to transfer several hundred Netbeans projects over to a new IDE, and I don't want to forget which IDE I wrote something in either).