others.md 3.3 KB
Newer Older
张磊 已提交
1 2
## API与对应的库参照表

3 4 5 6 7 8 9 10 11 12 13 14
|模块名称							|本地依赖库												|线上依赖库																													|最低支持安卓版本	|依赖的模块																							|
|:--								|:--													|:--																														|:--				|:--																								|
|uni-createRequestPermissionListener|uni-createRequestPermissionListener-release.aar		|-																															|-					|-																									|
|uni-createWebviewContext			|uni-createWebviewContext-release.aar					|-																															|-					|-																									|
|uni-fileSystemManager				|uni-fileSystemManager-release.aar						|-																															|-					|-																									|
|uni-getLocation-system				|uni-getLocation-system-release.aar						|-																															|-					|-																									|
|uni-getNetworkType					|uni-getNetworkType-release.aar							|-																															|-					|-																									|
|uni-installApk						|uni-installApk-release.aar								|-																															|-					|-																									|
|uni-network						|uni-network-release.aar								|com.squareup.okhttp3:okhttp:3.12.12																						|-					|-																									|
|uni-websocket						|uni-websocket-release.aar								|com.squareup.okhttp3:okhttp:3.12.12																						|-					|-																									|
|uni-cloud-client					|uni-cloud-client-release.aar							|-																															|-					|uni-network<br/>uni-storage<br/>uni-getSystemInfo<br/>uni-prompt<br/>uni-media<br/>uni-websocket	|
|uni-media							|uni-media-release.aar<br/>nativeobj-preview-release.aar|com.github.bumptech.glide:glide:4.9.0<br/>androidx.recyclerview:recyclerview:1.0.0<br/>androidx.appcompat:appcompat:1.0.0	|-					|uni-prompt																							|
张磊 已提交
15 16 17 18 19

各模块对应的API可参考文档[App端支持的内置模块列表](https://doc.dcloud.net.cn/uni-app-x/collocation/manifest-modules.html#utsmodules)

## 配置

张磊 已提交
20
根据编译出来的`unpackage/resource/app-android/{appid}/www/manifest.json`中的`app->distribute->modules`下的模块配置。
张磊 已提交
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37

### 配置本地依赖库

将上表中本地依赖库对应的aar拷贝到app模块的libs目录下

### 配置线上依赖库

将上表中的线上依赖库添加到app模块的build.gradle中。以`uni-network`为例,参考:

```
	dependencies {
		implementation 'com.squareup.okhttp3:okhttp:3.12.12'
	}
```

## 其他模块

38 39 40 41
### canvas

#### 本地依赖库

张磊 已提交
42 43 44 45
|名称								|
|:--								|
|uni-canvas-release.aar				|
|uni-canvas-component-release.aar	|
46 47 48 49 50 51 52

#### 组件注册

将以下内容添加到主模块的build.gradle,详见[根据configjson配置应用](../../use/android.md#utscomponents)

```groovy
defaultConfig {
张磊 已提交
53
    buildConfigField "String", "UTSRegisterComponents", "\"[{\\\"name\\\":\\\"canvas\\\",\\\"class\\\":\\\"io.dcloud.canvas.CanvasComponent\\\",\\\"node\\\":\\\"io.dcloud.canvas.UniCanvasElementImpl\\\"}]\""
54 55 56
}
```

张磊 已提交
57 58 59 60 61 62 63 64 65 66 67
[uni-ad](/native/modules/android/uni-ad.md)

[uni-video](/native/modules/android/uni-video.md)

[uni-push](/native/modules/android/uni-push.md)

[uni-facialRecognitionVerify](/native/modules/android/uni-facialRecognitionVerify.md)

[uni-verify](/native/modules/android/uni-verify.md)

[uni-payment](/native/modules/android/uni-payment.md)