Arnaud
Arnaud

Reputation: 81

Import module on Android Studio

I've got a problem on library importation. I followed these step :

  1. File / New / Import Module.
  2. Then I go to Project structure, Dependencies and "+". But there is Nothing to show.

Is somebody can help me ?

Screen : https://i.sstatic.net/B72EM.jpg

Upvotes: 2

Views: 4167

Answers (4)

ramz_adf
ramz_adf

Reputation: 66

Go to main menu -> File -> New -> Import Module. Then select the source code. Give module a name. (Android studio 3.3)

Add following line to app build.gradle

implementation project(':module_name')

Also in the settings.gradle file should have following line

  include ':app'
  include ':module_name'

Import module

Upvotes: 1

Bunny
Bunny

Reputation: 1064

You need to add import module in gradle also

Try this

implementation project(path: ':yourLibName')

than sync it will show dependencies.

Upvotes: 0

Umair
Umair

Reputation: 6426

In order to add library module in your project you should follow the following steps:

1) After adding library, open your project's build.gradle file and add implementation project(path: ':yourLibraryName').

2) Don't sync yet, now open your settings.gradle file and add your project with your library: include ':yourLibrayName', ':yourProject/ModuleName'. Now sync.

3) After sync you will be able to use your library in your project.

Upvotes: 1

xbadal
xbadal

Reputation: 1375

try : go to SDK manager-> SDK tools : look for Support repository and download them this might work

Upvotes: 0

Related Questions