http://nameless.cis.udel.edu/class_wiki/index.php?title=CISC181_S2019_NewPlainJavaInAndroidStudio&feed=atom&action=historyCISC181 S2019 NewPlainJavaInAndroidStudio - Revision history2024-03-28T21:36:15ZRevision history for this page on the wikiMediaWiki 1.28.0http://nameless.cis.udel.edu/class_wiki/index.php?title=CISC181_S2019_NewPlainJavaInAndroidStudio&diff=1499&oldid=prevCer at 14:01, 17 April 20192019-04-17T14:01:43Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 14:01, 17 April 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This is necessary for the JUnit unit testing framework to work smoothly  </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This is necessary for the JUnit unit testing framework to work smoothly<ins class="diffchange diffchange-inline">.  Basically, don't make a java module as the other instructions say.  The [http://nameless.cis.udel.edu/class_wiki/index.php/CISC181_S2019_NewAndroidStudioProject first few steps for making a new project] are unchanged.</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Open your Android project in Android Studio. If you do not have one, create one.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Open your Android project in Android Studio. If you do not have one, create one.</div></td></tr>
</table>Cerhttp://nameless.cis.udel.edu/class_wiki/index.php?title=CISC181_S2019_NewPlainJavaInAndroidStudio&diff=1497&oldid=prevCer at 13:58, 17 April 20192019-04-17T13:58:13Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 13:58, 17 April 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l1" >Line 1:</td>
<td colspan="2" class="diff-lineno">Line 1:</td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>This is necessary for JUnit testing to work smoothly  </div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>This is necessary for <ins class="diffchange diffchange-inline">the </ins>JUnit <ins class="diffchange diffchange-inline">unit </ins>testing <ins class="diffchange diffchange-inline">framework </ins>to work smoothly  </div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Open your Android project in Android Studio. If you do not have one, create one.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div># Open your Android project in Android Studio. If you do not have one, create one.</div></td></tr>
<tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l18" >Line 18:</td>
<td colspan="2" class="diff-lineno">Line 18:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Now if you click '''Run''' (or use Shift+F10 keyboard shortcut), this should compile and run your app module.  If it does not happen quickly (the first time may be quite slow), there is a progress bar at the bottom of the window.  If you get an error the first time, try again.</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>Now if you click '''Run''' (or use Shift+F10 keyboard shortcut), this should compile and run your app module.  If it does not happen quickly (the first time may be quite slow), there is a progress bar at the bottom of the window.  If you get an error the first time, try again.</div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;"></ins></div></td></tr>
<tr><td colspan="2"> </td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><ins style="font-weight: bold; text-decoration: none;">See [https://developer.android.com/training/testing/unit-testing/local-unit-tests here] for directions on running your unit tests</ins></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can tweak your editor's look and feel at '''File > Settings > Editor'''</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can tweak your editor's look and feel at '''File > Settings > Editor'''</div></td></tr>
</table>Cerhttp://nameless.cis.udel.edu/class_wiki/index.php?title=CISC181_S2019_NewPlainJavaInAndroidStudio&diff=1496&oldid=prevCer at 13:57, 17 April 20192019-04-17T13:57:30Z<p></p>
<table class="diff diff-contentalign-left" data-mw="interface">
<col class='diff-marker' />
<col class='diff-content' />
<col class='diff-marker' />
<col class='diff-content' />
<tr style='vertical-align: top;' lang='en'>
<td colspan='2' style="background-color: white; color:black; text-align: center;">← Older revision</td>
<td colspan='2' style="background-color: white; color:black; text-align: center;">Revision as of 13:57, 17 April 2019</td>
</tr><tr><td colspan="2" class="diff-lineno" id="mw-diff-left-l14" >Line 14:</td>
<td colspan="2" class="diff-lineno">Line 14:</td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><li>Click on the drop down menu to the left of the '''Run''' button (the green triangle next to the bug icon). Click '''Edit Configurations'''...</li></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><li>Click on the drop down menu to the left of the '''Run''' button (the green triangle next to the bug icon). Click '''Edit Configurations'''...</li></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><li>In the new window, click on the green plus sign at the top left of the window and select '''Application'''</li></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div><li>In the new window, click on the green plus sign at the top left of the window and select '''Application'''</li></div></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div><li>A new application configuration should appear.  Enter in the details such as name ("MyJavaProgram"), your full main class ("cisc181.mylab_n.MyClass"), and classpath of your module ("<del class="diffchange diffchange-inline">java</del>"), and click '''OK'''.  Pop-up menus should help with faster completion here.</li></div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div><li>A new application configuration should appear.  Enter in the details such as name ("MyJavaProgram"), your full main class ("cisc181.mylab_n.MyClass"), and classpath of your module ("<ins class="diffchange diffchange-inline">app</ins>"), and click '''OK'''.  Pop-up menus should help with faster completion here.</li></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></ol></div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div></ol></div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'>−</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;"><div>Now if you click '''Run''' (or use Shift+F10 keyboard shortcut), this should compile and run your <del class="diffchange diffchange-inline">Java </del>module.  If it does not happen quickly (the first time may be quite slow), there is a progress bar at the bottom of the window.</div></td><td class='diff-marker'>+</td><td style="color:black; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;"><div>Now if you click '''Run''' (or use Shift+F10 keyboard shortcut), this should compile and run your <ins class="diffchange diffchange-inline">app </ins>module.  If it does not happen quickly (the first time may be quite slow), there is a progress bar at the bottom of the window<ins class="diffchange diffchange-inline">.  If you get an error the first time, try again</ins>.</div></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"></td></tr>
<tr><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can tweak your editor's look and feel at '''File > Settings > Editor'''</div></td><td class='diff-marker'> </td><td style="background-color: #f9f9f9; color: #333333; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #e6e6e6; vertical-align: top; white-space: pre-wrap;"><div>You can tweak your editor's look and feel at '''File > Settings > Editor'''</div></td></tr>
</table>Cerhttp://nameless.cis.udel.edu/class_wiki/index.php?title=CISC181_S2019_NewPlainJavaInAndroidStudio&diff=1495&oldid=prevCer: Created page with "This is necessary for JUnit testing to work smoothly # Open your Android project in Android Studio. If you do not have one, create one. # On the far left there should be a "..."2019-04-17T13:52:15Z<p>Created page with "This is necessary for JUnit testing to work smoothly # Open your Android project in Android Studio. If you do not have one, create one. # On the far left there should be a "..."</p>
<p><b>New page</b></p><div>This is necessary for JUnit testing to work smoothly <br />
<br />
# Open your Android project in Android Studio. If you do not have one, create one.<br />
# On the far left there should be a "project view" pane. If not, click sideways (vertical) tab that says "1: Project" or type "Alt+1" (hold down Alt key and press 1)<br />
# Open the "app/java" module folder. There should be 3 subdirectories starting with your package name ("cisc181.mylabN" or similar). The second and third should have "(androidTest)" and "(test)" after the package name.<br />
# Right-click the first directory and choose '''New > Java Class'''. Fill in the name of your top level class if you have a main(), or whatever utility class you are developing (such as "Fraction"), and click "OK".<br />
# In the project pane, double-click on the package subdirectory and then "MyClass" (or whatever your class name is) and start coding! For example, paste this into MyClass (between the curly braces) and save with Control-S:<br />
public static void main(String[] args) <br />
{<br />
System.out.println("Hello World!"); <br />
}<br />
<ol start="7"><br />
<li>Before you forget, make sure to ADD YOUR NAME to the code as a comment.</li><br />
<li>Click on the drop down menu to the left of the '''Run''' button (the green triangle next to the bug icon). Click '''Edit Configurations'''...</li><br />
<li>In the new window, click on the green plus sign at the top left of the window and select '''Application'''</li><br />
<li>A new application configuration should appear. Enter in the details such as name ("MyJavaProgram"), your full main class ("cisc181.mylab_n.MyClass"), and classpath of your module ("java"), and click '''OK'''. Pop-up menus should help with faster completion here.</li><br />
</ol><br />
<br />
Now if you click '''Run''' (or use Shift+F10 keyboard shortcut), this should compile and run your Java module. If it does not happen quickly (the first time may be quite slow), there is a progress bar at the bottom of the window.<br />
<br />
You can tweak your editor's look and feel at '''File > Settings > Editor'''</div>Cer