- Expert Android Programming
- Prajyot Mainkar
- 268字
- 2021-07-08 10:29:05
Adding as a module
You can also add a library in Android Studio by adding it as a module. To add the module:
- First, place the library code in any folder of your choice
- Then, you need to Import the library as a module in your app. The figure below shows the steps to add the library as a Module:

This will open a new window where you need to select the library that you have saved to the directory. When you have selected the directory, click on Done. This will import the external library into your project.
As an example, I have added the module crop image to my project, which appears in my project folder.

It will open a new window with your app module and library module in the list. Choose you app module, and then select the dependency list.
Next, click on the plus icon which will open another dialog with the module name. Select it and click OK:

This will build the Gradle and add the module to the build.gradle, and it will be seen as a compiled project here:

Note that Core, UI and Util sub projects can also have their own build.gradle file, depending on their specific needs. Alternatively, you can also define the dependencies of a project in the root build.gradle file, as discussed in the preceding section. In this case, we won't be focusing on these points.
- SQL Server 從入門到項目實踐(超值版)
- Django+Vue.js商城項目實戰(zhàn)
- Mastering NetBeans
- 在最好的年紀學Python:小學生趣味編程
- Java系統(tǒng)分析與架構(gòu)設(shè)計
- HBase從入門到實戰(zhàn)
- 微服務設(shè)計原理與架構(gòu)
- Java設(shè)計模式及實踐
- Python忍者秘籍
- Java程序設(shè)計入門
- Raspberry Pi Home Automation with Arduino(Second Edition)
- 劍指大數(shù)據(jù):企業(yè)級數(shù)據(jù)倉庫項目實戰(zhàn)(在線教育版)
- Learning Continuous Integration with TeamCity
- Java Web從入門到精通(第3版)
- Java Web開發(fā)實例大全(基礎(chǔ)卷) (軟件工程師開發(fā)大系)