0

I am having trouble using Android Studio for a pure Java project, I wondered if someone could help please?

I am trying to follow the following steps in a Heroku Java/Gradle tutorial: https://devcenter.heroku.com/articles/getting-started-with-gradle-on-heroku#push-local-changes

I am trying to use Android Studio to compile and run the example code here: https://github.com/heroku/gradle-getting-started

I am trying to use the steps here for a pure Java project in AS (although doesn't seem very relevant for AS 2.3.3): Android Studio: create Java project with no Android dependencies

The project doesn't seem to get the dependencies right. The code doesn't compile because it doesn't recognise the ratpack folder as a dependency: enter image description here

I wondered if anyone had any advise or suggestions? I am wary of changing the code or project structure as it is Heroku tutorial code so should still work when deployed to Heroku.

Cheers, Riz

chdryra
  • 523
  • 5
  • 17

1 Answers1

-1

If this Main.java file is your Main Activity(launcher activity) then in Android you don't have to use this String[] args main method but you have to extend it by AppCompatActivity

  • I'm trying to use Android Studio as the IDE for a Java project not an Android one. – chdryra Jun 16 '17 at 14:01
  • 1
    Android studio can be used only for Android projects, for Java projects use IntelliJ IDEA Community edition or netbeans or BlueJ, eclipse for simple Java Projects, personally I like IntelliJ IDEA :-) – Aayushman chaudhory Jun 16 '17 at 14:03
  • From what I understand one can use AS for Java projects as its just IDEA CE underneath, you just need to hack it appropriately by removing certain files and directories. I tried following the steps in the link above but to no avail. – chdryra Jun 16 '17 at 14:26
  • That's true but not efficient and less productive – Aayushman chaudhory Jun 18 '17 at 07:55