Android Studio: create Java project with no Android dependencies

前端 未结 10 1678
遇见更好的自我
遇见更好的自我 2020-12-12 16:20

It\'s possible to add pure Java module to existing Android project.

But is it possible to create pure Java project with no Android dependencies?

10条回答
  •  误落风尘
    2020-12-12 16:56

    One thing that you might want to add here to help REALLY new folks out (it kept tripping me up) is that after creating the folder hierarchy for your Java code (src/main/java) you must right click the java folder and select Mark Directory As > Sources Root. Otherwise, you won't have the option of creating a new java class within the foo directory.

提交回复
热议问题