优化细节
This commit is contained in:
19
README.md
19
README.md
@@ -349,6 +349,25 @@ compileOptions {
|
||||
|
||||
```
|
||||
|
||||
> 当使用的ZXingLite为 **v2.3.x** 以上版本时,即更新zxing至v3.5.1后;如果要兼容Android 7.0(N)以下版本(即:minSdk<24),需通过脱糖获得 Java 8 及更高版本 API。
|
||||
|
||||
```gradle
|
||||
compileOptions {
|
||||
// Flag to enable support for the new language APIs
|
||||
coreLibraryDesugaringEnabled true
|
||||
// Sets Java compatibility to Java 8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
```
|
||||
|
||||
```gradle
|
||||
dependencies {
|
||||
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.2.2'
|
||||
}
|
||||
```
|
||||
|
||||
更多使用详情,请查看[app](app)中的源码使用示例或直接查看[API帮助文档](https://jenly1314.github.io/projects/ZXingLite/doc/)
|
||||
|
||||
### 相关推荐
|
||||
|
||||
@@ -26,6 +26,7 @@ android {
|
||||
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
@@ -45,6 +46,8 @@ dependencies {
|
||||
implementation deps.androidx.appcompat
|
||||
implementation deps.androidx.constraintlayout
|
||||
|
||||
coreLibraryDesugaring deps.desugar_jdk
|
||||
|
||||
// implementation deps.kotlin
|
||||
// implementation deps.corektx
|
||||
|
||||
|
||||
Binary file not shown.
@@ -38,6 +38,8 @@ versions.zxing = "3.5.1"
|
||||
|
||||
versions.camerax = "1.2.1"
|
||||
|
||||
versions.desugar_jdk_libs = "1.2.2"
|
||||
|
||||
versions.easypermissions = "3.0.0"
|
||||
|
||||
ext.versions = versions
|
||||
@@ -57,7 +59,6 @@ test.runner = "androidx.test:runner:$versions.runner"
|
||||
test.espresso = "androidx.test.espresso:espresso-core:$versions.espresso"
|
||||
deps.test = test
|
||||
|
||||
|
||||
//deps.kotlin = "org.jetbrains.kotlin:kotlin-stdlib:$versions.kotlin"
|
||||
//
|
||||
//deps.corektx = "androidx.core:core-ktx:$versions.coreKtx"
|
||||
@@ -71,6 +72,8 @@ deps.camera_camera2 = "androidx.camera:camera-camera2:$versions.camerax"
|
||||
deps.camera_lifecycle = "androidx.camera:camera-lifecycle:$versions.camerax"
|
||||
deps.camera_view = "androidx.camera:camera-view:$versions.camerax"
|
||||
|
||||
//desugar_jdk
|
||||
deps.desugar_jdk = "com.android.tools:desugar_jdk_libs:$versions.desugar_jdk_libs"
|
||||
|
||||
//permission
|
||||
deps.easypermissions = "pub.devrel:easypermissions:$versions.easypermissions"
|
||||
|
||||
@@ -27,6 +27,7 @@ android {
|
||||
}
|
||||
|
||||
compileOptions {
|
||||
coreLibraryDesugaringEnabled true
|
||||
sourceCompatibility JavaVersion.VERSION_11
|
||||
targetCompatibility JavaVersion.VERSION_11
|
||||
}
|
||||
@@ -43,10 +44,13 @@ dependencies {
|
||||
androidTestImplementation deps.test.runner
|
||||
androidTestImplementation deps.test.espresso
|
||||
|
||||
coreLibraryDesugaring deps.desugar_jdk
|
||||
|
||||
compileOnly deps.androidx.appcompat
|
||||
api deps.zxing
|
||||
api deps.camera_core
|
||||
api deps.camera_camera2
|
||||
api deps.camera_lifecycle
|
||||
api deps.camera_view
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user