'Importing Module in Android Studio
How can I import an external module (named ViewPagerIndicator) in Android Studio?
Solution 1:[1]
To import an existing Java library to an android project. Do the following.
Then select your Java library.
Solution 2:[2]
- Click on
Fileand selectImport Module option. - Open of select your
ViewPagerIndicatormodule from local. - add
compile project(path: ':ViewPagerIndicator')in your gradle file.
Solution 3:[3]
This tutorial will help you to do easily that without any code in build.gradle (actually system will do code for you).
Solution 4:[4]
I was also facing the same issue. Please make sure below steps
1)build.gradle :-
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation project(path: ':<Project-name>')
2) settings.gradle
include ':<Project-name>'
Solution 5:[5]
- Go to File > New > Project Structure
- In the left you see Dependencies, click on it
- All Modules need to be chosen
- Click + and Library Dependency
- Search module that you need
Solution 6:[6]
In case you have a module in your android project called library for example, and you want to add this module as a library to another module called app for example, in that same android project, here's what just worked for me, add this inside your app module's build.gradle:
dependencies {
implementation project(path: ':library')
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Siddarth Kanted |
| Solution 2 | Sushin Pv |
| Solution 3 | Gk Mohammad Emon |
| Solution 4 | sharma_kunal |
| Solution 5 | ВладиÑлав Блоцкий |
| Solution 6 |

