yushulx / flutter_barcode_sdk

Build barcode QR detection apps for Windows, Linux, macOS, Android, iOS and web.
https://pub.dev/packages/flutter_barcode_sdk
MIT License
47 stars 18 forks source link

Execution failed for task ':flutter_barcode_sdk:generateReleaseRFile'. #41

Closed han1548772930 closed 1 year ago

han1548772930 commented 1 year ago

FAILURE: Build failed with an exception.

BUILD FAILED in 19s Running Gradle task 'assembleRelease'... 19.9s [!] Gradle threw an error while downloading artifacts from the network. Retrying Gradle Build: #5, wait time: 1600ms

han1548772930 commented 1 year ago

I downloaded DynamsoftBarcodeReader. aar, but where should I put it and how to reference it

yushulx commented 1 year ago

@han1548772930 I think your issue is caused by network connection. To use the local *.aar file, you can create a libs folder under https://github.com/yushulx/flutter_barcode_sdk/tree/main/android directory, and then copy your aar files into the folder. After that, configure the build.gradle file as follows:

     repositories {
       flatDir {
           dirs 'libs'
       }
     }
     dependencies {
        implementation(name: 'name-of-your-aar-file', ext: 'aar')
     }
han1548772930 commented 1 year ago

@han1548772930我认为您的问题是由网络连接引起的。要使用本地*.aar文件,可以在https://github.com/yushulx/flutter_barcode_sdk/tree/main/androidlibs目录下创建一个文件夹,然后将 aar 文件复制到该文件夹​​中。之后,配置文件如下:build.gradle

    repositories {
      flatDir {
          dirs 'libs'
      }
    }
    dependencies {
       implementation(name: 'name-of-your-aar-file', ext: 'aar')
    }

thx