Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

This file was deleted.

18 changes: 9 additions & 9 deletions Android/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

```
TUIChatSalon
├─ App // 主面板,各种场景入口
├─ Debug // 调试相关
└─ Source // 语音沙龙业务逻辑
├─ app // 主面板,各种场景入口
├─ debug // 调试相关
└─ tuichatsalon // 语音沙龙业务逻辑
```

## 环境准备
Expand All @@ -27,7 +27,7 @@ TUIChatSalon

### 配置工程文件
1. 使用 Android Studio(3.5及以上的版本)打开源码工程`TUIChatSalon `。
2. 找到并打开`TUIChatSalon/Debug/src/main/java/com/tencent/liteav/debug/GenerateTestUserSig.java`文件。
2. 找到并打开`TUIChatSalon/debug/src/main/java/com/tencent/liteav/debug/GenerateTestUserSig.java`文件。
3. 设置`GenerateTestUserSig.java`文件中的相关参数:
<ul style="margin:0"><li/>SDKAPPID:默认为占位符(PLACEHOLDER),请设置为实际的 SDKAppID。
<li/>SECRETKEY:默认为占位符(PLACEHOLDER),请设置为实际的密钥信息。</ul>
Expand All @@ -45,7 +45,7 @@ TUIChatSalon

#### 方法一:自动加载(aar)
实时音视频(TRTC) SDK 已经发布到 JCenter 库,您可以通过配置 gradle 自动下载更新。
只需要用 Android Studio 打开需要集成 SDK 的工程,然后通过简单的三个步骤修改 App/build.gradle 文件,就可以完成 SDK 集成:
只需要用 Android Studio 打开需要集成 SDK 的工程,然后通过简单的三个步骤修改 app/build.gradle 文件,就可以完成 SDK 集成:

1. 在 dependencies 中添加 SDK 的依赖。
- 若使用3.x版本的 com.android.tools.build:gradle 工具,请执行以下命令:
Expand Down Expand Up @@ -81,29 +81,29 @@ defaultConfig {
如果您的网络连接 JCenter 有问题,您也可以手动下载 SDK 集成到工程里:

1. 下载最新版本 [实时音视频 SDK](https://liteav.sdk.qcloud.com/download/latest/TXLiteAVSDK_TRTC_Android_latest.zip)。
2. 将下载到的 aar 文件拷贝到工程的 **App/libs** 目录下。
2. 将下载到的 aar 文件拷贝到工程的 **app/libs** 目录下。
3. 在工程根目录下的 build.gradle 中,添加 **flatDir**,指定本地仓库路径。

```
allprojects {
repositories {
flatDir {
dirs 'libs'
dirs project(':App').file('libs')
dirs project(':app').file('libs')
}
}
}
```

4. 在 App/build.gradle 中,添加引用 aar 包的代码。
4. 在 app/build.gradle 中,添加引用 aar 包的代码。

```
dependencies {
compile(name: 'LiteAVSDK_TRTC_xxx', ext: 'aar') // xxx表示解压出来的SDK版本号
}
```

5. 在 App/build.gradle的defaultConfig 中,指定 App 使用的 CPU 架构。
5. 在 app/build.gradle的defaultConfig 中,指定 App 使用的 CPU 架构。

```
defaultConfig {
Expand Down
3 changes: 1 addition & 2 deletions Android/App/build.gradle → Android/app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,5 @@ android {

dependencies {
api fileTree(dir: 'libs', include: ['*.jar'])
api project(":Source")
api project(':Debug')
api project(":tuichatsalon")
}
File renamed without changes.
10 changes: 4 additions & 6 deletions Android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,11 @@ buildscript {
jcenter()
google()
mavenCentral()
//tpns接入
maven { url 'http://developer.huawei.com/repo/' }

}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
//tpns集成插件
classpath "com.tencent.android.tpns:tpnsplugin:1.8.0"


// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
Expand All @@ -22,12 +20,12 @@ buildscript {
allprojects {
repositories {
flatDir {
dirs project(':App').file('libs')
dirs project(':app').file('libs')
}
jcenter()
google()
mavenCentral()
maven { url 'http://developer.huawei.com/repo/' } // 华为仓,如果不集成华为可以不加

}
}

Expand Down
1 change: 1 addition & 0 deletions Android/Debug/build.gradle → Android/debug/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ android {
defaultConfig {
minSdkVersion 17
targetSdkVersion 26
buildConfigField("boolean", "RTCube_APPSTORE", "${RTCube_AppStore}")
}

buildTypes {
Expand Down
File renamed without changes.
Loading