I just created my first project in Android Studio and now I want to add a third-party library to the project (which is also built by gradle). How can this be done? I have tried so far:
- File-> Import Module-> Select build.gradle from the library folder.
- Displays the text ": build.gradle" next to "Module name:", as well as the error message: "The project already contains a module with this name." The completion button remains disabled until the ": build.gradle" value is changed.
- Changing ": build.gradle" to "something-else" turns on the completion button, but clicking causes the following error message:
FileNotFoundException: /Workspace/AndroidStudio/project/something-else (No such file or directory): /Workspace/AndroidStudio/project/something-else (No such file or directory)
Obviously, the wrong approach for importing a module as a dependency. But how else should this be done? Any advice is welcome, thanks!
source
share