Skip to content

Commit ed5ee7b

Browse files
committed
fix: bundleReleaseLocalLintAar bug
1 parent acf778f commit ed5ee7b

File tree

4 files changed

+41
-20
lines changed

4 files changed

+41
-20
lines changed

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<div align="center">
2-
<img src="https://narol-blog.oss-cn-beijing.aliyuncs.com/blog-img/202406161634484.svg" width="200" height="200">
2+
<img src="https://narol-blog.oss-cn-beijing.aliyuncs.com/blog-img/202406162113801.svg" width="200" height="200">
33
<h1>React-Native-Tencent-ASR</h1>
44
<p>
55
<b>A React Native wrapper around the Tencent Cloud ASR SDK for Android and iOS.</b>
@@ -33,6 +33,18 @@ npm install react-native-tencent-asr
3333
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
3434
```
3535

36+
- 拥有tecentcloud asr的sdk包没有发布到maven,因此需要编辑 android/build.gradle, 添加flatDir配置来应用这些包。
37+
38+
```
39+
allprojects {
40+
repositories {
41+
flatDir {
42+
dirs project(':rn-spotify-sdk').file('libs')
43+
}
44+
}
45+
}
46+
```
47+
3648
## Features
3749

3850
- 录音文件识别极速版

android/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ buildscript {
55
}
66

77
dependencies {
8-
classpath "com.android.tools.build:gradle:7.2.1"
8+
classpath 'com.android.tools.build:gradle:3.4.1'
99
}
1010
}
1111

@@ -76,14 +76,15 @@ repositories {
7676
google()
7777
}
7878

79-
8079
dependencies {
8180
// For < 0.71, this will be from the local maven repo
8281
// For > 0.71, this will be replaced by `com.facebook.react:react-android:$version` by react gradle plugin
8382
//noinspection GradleDynamicVersion
8483
implementation "com.facebook.react:react-native:+"
8584
implementation 'com.google.code.gson:gson:2.8.5'
8685
implementation 'com.squareup.okhttp3:okhttp:4.2.2'
87-
compileOnly fileTree(include: ['*.jar', '*.aar'], dir: 'libs')
86+
implementation(name: 'asr-file-recognize-release', ext: 'aar')
87+
implementation(name: 'asr-one-sentence-release', ext: 'aar')
88+
implementation(name: 'asr-realtime-release', ext: 'aar')
8889
}
8990

example/android/build.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,12 @@ buildscript {
1818
}
1919
}
2020

21+
allprojects {
22+
repositories {
23+
flatDir {
24+
dirs project(':react-native-tencent-asr').file('libs')
25+
}
26+
}
27+
}
28+
2129
apply plugin: "com.facebook.react.rootproject"

0 commit comments

Comments
 (0)