How to import a library project in Android Studio, without making a copy?

OK I know people have asked this problem thousands times, but Android studio is so so so hard to understand and use and I still can't find the correct way.

I find several solutions, but all of them says to copy the library codes into main project. It makes no sense to me. When I try to build a standalone project for the library, I find no "New project from existing source" like that in Eclipse.

Can I have a step-to-step for:

  1. I have a main Android Studio project
  2. I have an Eclipse Android library project
  3. Without making a copy of library project
  4. I can let the main project "use" library project

The point is, if I have many app projects using the same library source, I can just modify one copy. If I need to put library codes in every app project, it's a disaster. Eclipse can do this without any problem.

Thank you. I'm really exhausted with Android Studio, but I can't choose to stay on Eclipse since Google says ADT won't be supported anymore.

Upvotes: 12

Views: 7059

Answers (3)

tchoum
tchoum

Reputation: 332

The real answer to keep your library project only in one place is in this post :

Android Studio 0.8.1 Creating Modules without copying files?

Upvotes: 7

Pr38y
Pr38y

Reputation: 1565

In Android Studio Project import your eclipse library project as new module. Then in Android studio right click on your app module go to module setting > select dependency tab > click plus> select module dependency > select library project module.

Upvotes: 0

KillNono
KillNono

Reputation: 272

new Module or import Module under the project,
then open Module Settings--》Module dependencies --》‘+’ module dependencie.

Upvotes: -1

Related Questions