I am currently using eclipse for JAVA since Intellij IDEA is under paid Licence.However, I am using Android Studio for Android development. Could I use Android Studio to write pure JAVA so as to not have to learn two different IDEs (shortcuts etc)?
Asked
Active
Viewed 3,952 times
2
-
1There is a free community edition of intellij. Which even professionals can use for commercial work for free. I would definitely prefer that over an ide that adds a ton of complexity for something you never intend to use. – GhostCat Nov 21 '19 at 20:53
-
Android studio is for android dev only . just try free community edition of intellij. – ZINE Mahmoud Nov 21 '19 at 20:57
2 Answers
2
The short answer to this is : Yes you can. Look over this slackoverflow post:
Can Android Studio be used to run standard Java projects?
Android Studio IDE is based on IntelliJ, but with some specific plugins added for Android Development. For that matter you could use Android Studio for Java dev just as much as you can use IntelliJ for Android dev. The two are very similar with some obvious differences. If you are proficient with one of the two you won't have any problems switching to the others. Now, my recommendation is to use IntelliJ for Java dev (free version) and Android Studio for Android dev.

Fabrizio Botalla
- 697
- 1
- 8
- 25
1
Yes Just Follow These Steps
1. Open a new Project and choose your Destination path and initial
settings: Hit Next on Form Factors (doesn’t matter) > Choose No
Activity and Finish
2. In the dropdown view Select Project
3. Remove app Directory and in Settings.gradle delete include ‘:app’ > ignore the Sync Now prompt at the top of the screen in Android Studio
4. Replace build.gradle code with the following > Then click Sync Now prompt
apply plugin: 'java'
sourceCompatibility = 1.8
version = '1.0'
repositories {
mavenCentral()
}
dependencies {
testCompile group: 'junit', name: 'junit', version: '4.11'
}
5. Configure src and Child Directories main, java, foo and .java Class > Add in main class to construct code and print results
public static void main(String[] arg) {
String hi = "Hello World";
System.out.println(hi);
}
6. Configure Android Studio to run your Java Class properly: Edit Configurations > ‘+’ > Application
7. Get Runin’!

Dpk
- 567
- 5
- 16