最近更新时间:2023.03.29 16:50:05
首次发布时间:2021.02.23 10:42:27
本文档为您介绍集成 Android 加载 SDK 前的准备工作。
本文档适用于 Android 2.3 及以上开发版本。
推荐您使用 Android Studio 作为开发工具,本开发文档基于 Android Studio 开发环境进行编写。
确保 project 根目录下的build.gradle
下配置服务,代码示例如下所示:
maven { url 'https://artifact.bytedance.com/repository/Volcengine/' }
请参考版本发布历史,获取 SDK 最新版本号。
在 module 目录下的build.gradle
文件中的dependencies
中添加 SDK 依赖,填入获取 SDK 最新版本获取的最新版本号,代码示例如下所示:
implementation 'com.bytedance.fresco:fresco:x.x.x' implementation "com.bytedance.fresco:animated-gif:x.x.x" //gif 解码库 implementation "com.bytedance.fresco:animated-webp:x.x.x" //webp animated implementation "com.bytedance.fresco:webpsupport:x.x.x" //低版本 webp 支持 implementation "com.bytedance.fresco:drawee:x.x.x" //fresco 组件 implementation "com.bytedance.fresco:statistics:x.x.x" //监控+网络组件 implementation "com.bytedance.fresco:heif:x.x.x" //heif 静图解码 implementation "com.bytedance.fresco:animated-heif:x.x.x" //heif 动图解码 implementation "com.bytedance.fresco:authorization:x.x.x" //授权认证+云控配置
请参考快速开始完成 SDK 初始化和基本使用。