1
0
forked from uestc/Notes
Notes/Android开发笔记/Android引入其他工程.md
2024-10-17 15:36:48 +08:00

20 lines
771 B
Markdown
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## Android引入其他工程
在安卓开发中,我们为了开发方便,所以需要引入其他的已经封装好的模块。如下所示:
<img src="C:\Users\Administrator\AppData\Roaming\Typora\typora-user-images\image-20230211150717050.png" alt="image-20230211150717050" style="zoom: 50%;" />
在app工程中需要用到libsmb库提供的smb管理和访问的功能。需要在两个地方进行配置。首先是app工程目录下的settings.gradle中配置。
```shell
# settings.gradle的配置是编译器包含libsmb
rootProject.name = "My Application"
include ':app'
include ':libsmb'
# 在build.gradle中添加依赖选项
implementation fileTree(include: ['*.jar'], dir: 'libs')
...
implementation project(':libsmb')
```