Skip to content

Commit 21044b6

Browse files
committed
发布v2.2.0
1 parent b19976d commit 21044b6

File tree

27 files changed

+72
-62
lines changed

27 files changed

+72
-62
lines changed

README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -105,37 +105,37 @@ Camera:为各个子库提供相机预览分析的核心库
105105
106106
```gradle
107107
108-
//公共库 (*必须) (1.3.0新增:当使用到MLKit下面的子库时,需依赖公共库)
109-
implementation 'com.github.jenly1314.MLKit:mlkit-common:2.1.0'
108+
//公共库 (*必须)
109+
implementation 'com.github.jenly1314.MLKit:mlkit-common:2.2.0'
110110
111111
//--------------------------
112112
113113
//条码识别 (可选)
114-
implementation 'com.github.jenly1314.MLKit:mlkit-barcode-scanning:2.1.0'
114+
implementation 'com.github.jenly1314.MLKit:mlkit-barcode-scanning:2.2.0'
115115
116116
//人脸检测 (可选)
117-
implementation 'com.github.jenly1314.MLKit:mlkit-face-detection:2.1.0'
117+
implementation 'com.github.jenly1314.MLKit:mlkit-face-detection:2.2.0'
118118
119119
//人脸网格检测 (可选)
120-
implementation 'com.github.jenly1314.MLKit:mlkit-face-mesh-detection:2.1.0'
120+
implementation 'com.github.jenly1314.MLKit:mlkit-face-mesh-detection:2.2.0'
121121
122122
//图像标签 (可选)
123-
implementation 'com.github.jenly1314.MLKit:mlkit-image-labeling:2.1.0'
123+
implementation 'com.github.jenly1314.MLKit:mlkit-image-labeling:2.2.0'
124124
125125
//对象检测 (可选)
126-
implementation 'com.github.jenly1314.MLKit:mlkit-object-detection:2.1.0'
126+
implementation 'com.github.jenly1314.MLKit:mlkit-object-detection:2.2.0'
127127
128128
//姿势检测 (可选)
129-
implementation 'com.github.jenly1314.MLKit:mlkit-pose-detection:2.1.0'
129+
implementation 'com.github.jenly1314.MLKit:mlkit-pose-detection:2.2.0'
130130
131131
//姿势检测精确版 (可选)
132-
implementation 'com.github.jenly1314.MLKit:mlkit-pose-detection-accurate:2.1.0'
132+
implementation 'com.github.jenly1314.MLKit:mlkit-pose-detection-accurate:2.2.0'
133133
134134
//自拍分割 (可选)
135-
implementation 'com.github.jenly1314.MLKit:mlkit-segmentation-selfie:2.1.0'
135+
implementation 'com.github.jenly1314.MLKit:mlkit-segmentation-selfie:2.2.0'
136136
137137
//文字识别 (可选)
138-
implementation 'com.github.jenly1314.MLKit:mlkit-text-recognition:2.1.0'
138+
implementation 'com.github.jenly1314.MLKit:mlkit-text-recognition:2.2.0'
139139
140140
```
141141
@@ -311,12 +311,12 @@ BarcodeDecoder.process(bitmap).addOnSuccessListener(this) {
311311

312312
#### JDK版本
313313

314-
需使用JDK11+编译,在你项目中的build.gradle的android{}中添加配置:
314+
需使用JDK8+编译,在你项目中的build.gradle的android{}中添加配置:
315315

316316
```gradle
317317
compileOptions {
318-
sourceCompatibility JavaVersion.VERSION_11
319-
targetCompatibility JavaVersion.VERSION_11
318+
sourceCompatibility JavaVersion.VERSION_1_8
319+
targetCompatibility JavaVersion.VERSION_1_8
320320
}
321321
```
322322

@@ -329,6 +329,11 @@ compileOptions {
329329

330330
## 版本记录
331331

332+
#### v2.2.0:2024-7-11
333+
* 更新CameraScan至v1.2.0
334+
* 更新ViewfinderView至v1.2.0
335+
* 更新MLKit相关依赖库版本
336+
332337
#### v2.1.0:2023-12-31
333338
* 更新CameraScan至v1.1.0
334339
* 更新compileSdkVersion至34

app/build.gradle

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ android {
2929
}
3030

3131
compileOptions {
32-
sourceCompatibility JavaVersion.VERSION_11
33-
targetCompatibility JavaVersion.VERSION_11
32+
sourceCompatibility JavaVersion.VERSION_1_8
33+
targetCompatibility JavaVersion.VERSION_1_8
3434
}
3535

3636
kotlinOptions {
37-
jvmTarget = JavaVersion.VERSION_11.toString()
37+
jvmTarget = JavaVersion.VERSION_1_8.toString()
3838
}
3939
lint {
4040
abortOnError false

app/release/app-release.apk

730 KB
Binary file not shown.

app/release/output-metadata.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
"type": "SINGLE",
1212
"filters": [],
1313
"attributes": [],
14-
"versionCode": 11,
15-
"versionName": "2.1.0",
14+
"versionCode": 12,
15+
"versionName": "2.2.0",
1616
"outputFile": "app-release.apk"
1717
}
1818
],

change_log.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
## 版本记录
22

3+
#### v2.2.0:2024-7-11
4+
* 更新CameraScan至v1.2.0
5+
* 更新ViewfinderView至v1.2.0
6+
* 更新MLKit相关依赖库版本
7+
38
#### v2.1.0:2023-12-31
49
* 更新CameraScan至v1.1.0
510
* 更新compileSdkVersion至34

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ android.defaults.buildfeatures.buildconfig=true
2424
android.nonTransitiveRClass=false
2525
android.nonFinalResIds=false
2626

27-
VERSION_NAME=2.1.0
28-
VERSION_CODE=11
27+
VERSION_NAME=2.2.0
28+
VERSION_CODE=12
2929
GROUP=com.github.jenly1314.MLKit
3030

3131
POM_DESCRIPTION=MLKit for Android

mlkit-barcode-scanning/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ android {
2222
}
2323

2424
compileOptions {
25-
sourceCompatibility JavaVersion.VERSION_11
26-
targetCompatibility JavaVersion.VERSION_11
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
2727
}
2828
lint {
2929
abortOnError false

mlkit-barcode-scanning/src/main/java/com/king/mlkit/vision/barcode/analyze/BarcodeScanningAnalyzer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
*/
3535
public class BarcodeScanningAnalyzer extends CommonAnalyzer<List<Barcode>> {
3636

37-
private BarcodeScanner mDetector;
37+
private final BarcodeScanner mDetector;
3838

3939
public BarcodeScanningAnalyzer() {
4040
mDetector = BarcodeScanning.getClient();

mlkit-common/build.gradle

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ android {
2222
}
2323

2424
compileOptions {
25-
sourceCompatibility JavaVersion.VERSION_11
26-
targetCompatibility JavaVersion.VERSION_11
25+
sourceCompatibility JavaVersion.VERSION_1_8
26+
targetCompatibility JavaVersion.VERSION_1_8
2727
}
2828
lint {
2929
abortOnError false

mlkit-common/src/main/java/com/king/mlkit/vision/common/analyze/CommonAnalyzer.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ public void analyze(@NonNull ImageProxy imageProxy, @NonNull OnAnalyzeListener<T
6262
queue.add(bytes);
6363
joinQueue.set(true);
6464
}
65-
if (queue.isEmpty()) {
65+
final byte[] nv21Data = queue.poll();
66+
if(nv21Data == null) {
6667
return;
6768
}
68-
final byte[] nv21Data = queue.poll();
6969
try {
7070
ImageUtils.yuv_420_888toNv21(imageProxy, nv21Data);
7171
InputImage inputImage = InputImage.fromByteArray(

0 commit comments

Comments
 (0)