Can Android Studio be used to run standard Java projects? -


for times when want isolate java , give quick test..

can run non-android java projects in android studio in eclipse?

tested on android studio 0.8.6 - 2.1

using method can have java modules , android modules in same project , have ability compile , run java modules stand alone java projects.

  1. open android project in android studio. if not have one, create one.
  2. click file > new module. select java library , click next.
  3. fill in package name, etc , click finish. should see java module inside android project.
  4. add code java module you've created.
  5. click on drop down left of run button. click edit configurations...
  6. in new window, click on plus sign @ top left of window , select application
  7. a new application configuration should appear, enter in details such main class , classpath of module.
  8. click ok.

now if click run, should compile , run java module.

my usage case: android app relies on precomputed files function. these precomputed files generated java code. since these 2 things go hand in hand, makes sense have both of these modules in same project.


Comments

Popular posts from this blog

SPSS keyboard combination alters encoding -

Add new record to the table by click on the button in Microsoft Access -

javascript - jQuery .height() return 0 when visible but non-0 when hidden -