Closed ghost closed 4 years ago
I've tried adding -keep class com.apptreesoftware.barcodescan.** { *; }
to proguard-rules.pro and I've tried building without proguard, minifyEnable false
useProguard false
but always end up with the same error.
I had a similar problem when upgrading dependencies, I don't think this has anything to do with this flutter_barcode_reader.
Did you upgrade com.android.tools.build:gradle
to 3.2.0?
Bedug build works ok, but when I try to build a release build I also get a barcode_scan resolve error.
Execution failed for task ':app:lintVitalRelease'.
Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'. Could not resolve project :barcode_scan. Required by: project :app java.lang.NullPointerException (no error message)
in android/app/build.gradle this seems to push the error away ...
lintOptions { disable 'InvalidPackage' checkReleaseBuilds false }
@JamesMcIntosh i get error also when upgrade gradle to 3.2.0, so currenlty i stay on 3.1.2
I am having the same issue and I am hoping that it gets resolved in the next update for this package.
FAILURE: Build failed with an exception.
What went wrong: Execution failed for task ':app:lintVitalRelease'.
Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'. Could not resolve project :barcode_scan. Required by: project :app java.lang.NullPointerException (no error message)
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
BUILD FAILED in 57s
The same for me. Any update on this ?
Looks like it works using gradle plugin 3.1.2
classpath 'com.android.tools.build:gradle:3.1.2'
Any update, same issue here.
Any update?
I'm having the same issue.. can't use this plugin with RxDart because RxDart needs build 3.2.1.
anybody have solve the problem?share us please...
hey i fix this problem. insert this at gradle-wrapper.properties file distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
Plus one, so thanks for any reaction.
As we use this package in our production app, we depend on release builds and having them checked (signatures etc.). We are currently bound to Gradle version 4.6, so we can't switch the Android plugin version from 3.2.1 to anything else. 3.1.4 can't be used with our cmake version and 3.3.0 needs Gradle version 4.10 or higher.
A new version is available which solves the problem.
When attempting to flutter build apk --verbose, I get this: ` +29 ms] executing: [/Users/xxx/Development/Flutter/flutter/] git rev-parse --abbrev-ref --symbolic @{u} [ +29 ms] Exit code 0 from: git rev-parse --abbrev-ref --symbolic @{u} [ ] origin/master [ ] executing: [/Users/xxx/Development/Flutter/flutter/] git rev-parse --abbrev-ref HEAD [ +5 ms] Exit code 0 from: git rev-parse --abbrev-ref HEAD [ ] master [ ] executing: [/Users/Axxx/Development/Flutter/flutter/] git ls-remote --get-url origin [ +5 ms] Exit code 0 from: git ls-remote --get-url origin [ ] https://github.com/flutter/flutter.git [ ] executing: [/Users/xxx/Development/Flutter/flutter/] git log -n 1 --pretty=format:%H [ +6 ms] Exit code 0 from: git log -n 1 --pretty=format:%H [ ] d91f1608c59375647fda62ef401d5bdde38355d4 [ ] executing: [/Users/xxx/Development/Flutter/flutter/] git log -n 1 --pretty=format:%ar [ +7 ms] Exit code 0 from: git log -n 1 --pretty=format:%ar [ ] 2 weeks ago [ ] executing: [/Users/xxx/Development/Flutter/flutter/] git describe --match v.. --first-parent --long --tags [ +12 ms] Exit code 0 from: git describe --match v.. --first-parent --long --tags [ ] v0.9.5-45-gd91f1608c [ +199 ms] Found plugin barcode_scan at /Users/xxx.pub-cache/hosted/pub.dartlang.org/barcode_scan-0.0.7/ [ +53 ms] Found plugin shared_preferences at /Users/xxx.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.2/ [ +58 ms] Found plugin barcode_scan at /Users/xxx/.pub-cache/hosted/pub.dartlang.org/barcode_scan-0.0.7/ [ +30 ms] Found plugin shared_preferences at /Users/xxx/.pub-cache/hosted/pub.dartlang.org/shared_preferences-0.4.2/ [ +160 ms] Initializing gradle... [ +4 ms] Using gradle from /Users/xxx/Development/PenMobile.X/android/gradlew. [ +10 ms] executing: /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString [ +38 ms] Exit code 0 from: /usr/bin/defaults read /Applications/Android Studio.app/Contents/Info CFBundleShortVersionString [ ] 3.2 [ +69 ms] executing: /Users/xxx/Development/PenMobile.X/android/gradlew -v [ +570 ms]
[ ] Initializing gradle... (completed) [ +10 ms] Resolving dependencies... [ ] executing: [/Users/xxx/Development/PenMobile.X/android/] /Users/xxx/Development/PenMobile.X/android/gradlew app:properties [ +967 ms]
[ +10 ms] Resolving dependencies... (completed) [ +1 ms] Gradle task 'assembleRelease'... [ +3 ms] executing: [/Users/xxx/Development/PenMobile.X/android/] /Users/xxx/Development/PenMobile.X/android/gradlew -Pverbose=true -Ptarget=lib/main.dart -Ptarget-platform=android-arm assembleRelease [+1154 ms] 52 actionable tasks: 4 executed, 48 up-to-date [ +21 ms] FAILURE: Build failed with an exception. [ +2 ms] What went wrong: [ ] Execution failed for task ':app:lintVitalRelease'. [ ] > Could not resolve all artifacts for configuration ':app:dynamicProfileRuntimeClasspath'. [ ] > Could not resolve project :barcode_scan. [ ] Required by: [ ] project :app [ ] > java.lang.NullPointerException (no error message) [ ] Try: [ ] Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. [ ] * Get more help at https://help.gradle.org [ ] BUILD FAILED in 1s [ +394 ms] Gradle task 'assembleRelease'... (completed) [ +12 ms] "flutter apk" took 3,723ms. Gradle task assembleRelease failed with exit code 1
0 throwToolExit (package:flutter_tools/src/base/common.dart:26:3)
1 _buildGradleProjectV2 (package:flutter_tools/src/android/gradle.dart:395:5)