1

I'm building my first Android app and I found a java project on github that I would like to integrate with my app. Is it possible for me to manually add the java files to my android project directory at

app -> java -> com.example.appname

The src -> main directory of the java client has a nested file structure so I'm not sure if this would cause issues.

I already tried the solution from this post but I didn't see the option presented in step 2 How to import existing java project into android studio?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Omega Collision
  • 125
  • 2
  • 15
  • "I found a java project on github" -- you could add it as a gradle dependency in your project. – Bajal Jan 06 '18 at 04:12
  • So if I do a remote binary dependency to the github repo I don't actually need to import anything into the project? Would this impact performance? – Omega Collision Jan 06 '18 at 04:27

2 Answers2

0

Please use java code in MainActivity.java or other Activity. It Will work.same code you applied on java will also work on Activity .java

Pawan Soni
  • 860
  • 8
  • 19
0

You can add java project as module to your android project. Check Method 2 in this link

Suraj Vaishnav
  • 7,777
  • 4
  • 43
  • 46