Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I figured out a work around that seems to work on my Eclipse installation.</p> <ol> <li>Start Eclipse</li> <li>List "Run Configurations" from the "Run" menu.</li> <li>Select the "Android JUnit Test" category, and then click the "New" toolbar icon.</li> <li>A "New_configuration" will be created, but a "NullPointerException" will be shown. After this it's not possible to edit the configuration.</li> <li>Exit Eclipse</li> <li>Open your file explorer, and navigate to [eclipse-workspace].metadata.plugins\org.eclipse.debug.core.launches</li> <li>This is where the run configurations are stored. Edit the file "New_configuration.launch" with a text editor.</li> <li>There can't be an empty entry for the PROJEC_ATTR node. For the value attribute type the name of a project that exists in Eclipse. </li> <li>Save the file.</li> <li>Rename file to desired run configuration name.</li> <li>Start Eclipse</li> </ol> <p>You should now be able to edit the JUnit Test configuration for Android without receiving any NullPointer exceptions. I noticed after doing this, there are a few more XML nodes added to the configuration file that were missing before. So it seems that the bug is only during file creation, and not file updating.</p> <p>I hope this helps other people.</p> <p>Here is a sample launch file that works (assumes the project name is GemsTest.</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt; &lt;launchConfiguration type="com.android.ide.eclipse.adt.junit.launchConfigurationType"&gt; &lt;stringAttribute key="com.android.ide.eclipse.adt.commandline" value=""/&gt; &lt;intAttribute key="com.android.ide.eclipse.adt.delay" value="0"/&gt; &lt;booleanAttribute key="com.android.ide.eclipse.adt.nobootanim" value="false"/&gt; &lt;intAttribute key="com.android.ide.eclipse.adt.speed" value="0"/&gt; &lt;stringAttribute key="com.android.ide.eclipse.adt.target" value="AUTO"/&gt; &lt;booleanAttribute key="com.android.ide.eclipse.adt.wipedata" value="false"/&gt; &lt;stringAttribute key="org.eclipse.jdt.junit.CONTAINER" value=""/&gt; &lt;stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value=""/&gt; &lt;stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="GemsTest"/&gt; &lt;/launchConfiguration&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload