1

Primary topic:

Please help me with a problem encountered in attempt to begin Android project in Eclipse. Please note that I want to use Eclipse and not to install another IDE.

Secondary:

I want to know if this Eclipse/Android environment has this many bugs in daily use as well. Only (yes, only) if this is the case I would want to know what practical solution is there to develop Android applications on a low-profile Ubuntu PC.

Problem:

  • Ran New Android project wizard in Eclipse first time after install of the Android SDK plug-in.

  • After it was completed, the following message appeared:

    Errors occurred during the build.
    
    Errors running builder 'Android Resource Manager' on project 'pr1Android'.
    
    java.lang.NullPointerException
    

From the log file:

  1. Failed to load properties file for project 'pr1Android'

  2. Problems occurred when invoking code from plug-in: org.eclipse.core.resources.

    java.lang.NullPointerException
        at com.android.ide.eclipse.adt.internal.build.builders.BaseBuilder.abortOnBadSetup(BaseBuilder.java:327)
        at com.android.ide.eclipse.adt.internal.build.builders.ResourceManagerBuilder.build(ResourceManagerBuilder.java:92)
        at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:728)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:199)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:239)
        at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:292)
        at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:42)
        at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:295)
        at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:351)
        at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:374)
        at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:143)
        at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:241)
        at org.eclipse.core.internal.jobs.Worker.run(Worker.java:54)
    

Circumstance:

Dan
  • 11

1 Answers1

0

Please note that I have no idea as to the path of your JVM, as I have yet to install Java on my fresh Ubuntu 16.04 VirtualBox image, but this should get you started on the right path (pun intended).

You should have an eclipse.ini file located at $ECLIPSE_HOME/eclipse.ini

  1. Open the above file: gedit $ECLIPSE_HOME/eclipse.ini. For in-depth coverage of the file, refer to the References below.
  2. Find the line that reads -vmargs. Insert a blank line above it.
  3. On the Blank line add: -vm, and hit Enter to create another new line.
  4. On the Blank line, enter the PATH value for your Java machine, i.e. /opt/jdk-1.8.0_91/bin/java. Please note that the path could be very different.
  5. Make sure JAVA_HOMEand JDK_HOME are set. See How to set JAVA_HOME for Java?. Be sure to look at the pastebin comment if you have multiple versions.
  6. Logout and back in to accept the changes from Step 5.
  7. If all works well, I believe you can set -vm to the exported value in JAVA_HOME. If that fails after restarting Eclipse, I'll remove this step.

Regarding issues with Eclipse, I haven't had any major issues, but for Android Development, I actually prefer Android Studio, as it's the official IDE endorsed by Android. The reason you might consider it bloated is because the IDE settings are configured in such a way that the increased bloat is used to support those settings, I.e. type-checking for a hard-coded string, and the integrated layout editor.

References

java.lang.NullPointerException when creating first android app in OS X 10.9.4

Eclipse Wiki - eclipse.ini

eyoung100
  • 975