record
record copied to clipboard
Build error on Android - record ^4.4.1
Package version
record ^4.4.1
Describe the bug
When building my app to my Android device, the following error occurs :
* Where:
Build file 'C:\Users\barba\Documents\flutter\.pub-cache\hosted\pub.dartlang.org\record-4.4.1\android\build.gradle' line: 34
* What went wrong:
A problem occurred evaluating project ':record'.
> Could not find method disable() for arguments [InvalidPackage] on task ':record:lint' of type com.android.build.gradle.tasks.LintGlobalTask.
Deprecated Gradle features were used in this build, making it incompatible with Gradle 8.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
See https://docs.gradle.org/7.5.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 9s
Additional context
I saw this issue alread occured in #109. I tried following the given instructions but it doesn't solve my issue.
Here is my Flutter Doctor :
[√] Flutter (Channel stable, 3.3.3, on Microsoft Windows [version 10.0.22621.521], locale fr-FR)
[√] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[√] Chrome - develop for the web
[√] Visual Studio - develop for Windows (Visual Studio Build Tools 2019 16.6.4)
[√] Android Studio (version 2021.3)
[√] VS Code (version 1.72.0)
[√] Connected device (4 available)
[√] HTTP Host Availability
Thank you by advance !
Thanks for the report. I'll check this.
I had this error first
Warning: The plugin record requires Android SDK version 33.
For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration.
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\record-4.4.1\android\build.gradle' line: 25
* What went wrong:
A problem occurred evaluating project ':record'.
> No signature of method: build_ehyyaa1nrm3w1m2ym6i2on6hm.android() is applicable for argument types: (build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2) values: [build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2@61ec5b41]
* 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 8s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)
then updated build.gradel
- compileSdkVersion 33
- targetSdkVersion 33
and run flutter clean
then flutter pub get
I got same error:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\record-4.4.1\android\build.gradle' line: 25
* What went wrong:
A problem occurred evaluating project ':record'.
> No signature of method: build_ehyyaa1nrm3w1m2ym6i2on6hm.android() is applicable for argument types: (build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2) values: [build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2@63687a1a]
* 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 7s
I'm experiencing he same error. Flutter doctor output:
[✓] Flutter (Channel stable, 3.3.4, on macOS 12.0.1 21A559 darwin-x64, locale en-US) • Flutter version 3.3.4 on channel stable at /Users/vvv/Documents/dev/flutter • Upstream repository https://github.com/flutter/flutter.git • Framework revision eb6d86ee27 (2 weeks ago), 2022-10-04 22:31:45 -0700 • Engine revision c08d7d5efc • Dart version 2.18.2 • DevTools version 2.15.0
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0) • Android SDK at /Users/vvv/Library/Android/sdk • Platform android-33, build-tools 33.0.0 • ANDROID_SDK_ROOT = /Users/vvv/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840) • All Android licenses accepted.
[✓] Xcode - develop for iOS and macOS (Xcode 13.1) • Xcode at /Applications/Xcode.app/Contents/Developer • Build 13A1030d • CocoaPods version 1.11.2
[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2021.2) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 11.0.12+0-b1504.28-7817840)
[✓] VS Code (version 1.72.2) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.50.0
[✓] Connected device (3 available) • Pixel 3a (mobile) • 95CAY0UJG2 • android-arm64 • Android 11 (API 30) • macOS (desktop) • macos • darwin-x64 • macOS 12.0.1 21A559 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 106.0.5249.119
[✓] HTTP Host Availability • All required HTTP hosts are available
• No issues found!
I had this error first
Warning: The plugin record requires Android SDK version 33. For more information about build configuration, see https://docs.flutter.dev/deployment/android#reviewing-the-build-configuration. FAILURE: Build failed with an exception. * Where: Build file 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\record-4.4.1\android\build.gradle' line: 25 * What went wrong: A problem occurred evaluating project ':record'. > No signature of method: build_ehyyaa1nrm3w1m2ym6i2on6hm.android() is applicable for argument types: (build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2) values: [build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2@61ec5b41] * 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 8s Exception: Gradle task assembleDebug failed with exit code 1 Exited (sigterm)
then updated build.gradel
- compileSdkVersion 33
- targetSdkVersion 33
and run
flutter clean
thenflutter pub get
I got same error:
FAILURE: Build failed with an exception. * Where: Build file 'C:\src\flutter\.pub-cache\hosted\pub.dartlang.org\record-4.4.1\android\build.gradle' line: 25 * What went wrong: A problem occurred evaluating project ':record'. > No signature of method: build_ehyyaa1nrm3w1m2ym6i2on6hm.android() is applicable for argument types: (build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2) values: [build_ehyyaa1nrm3w1m2ym6i2on6hm$_run_closure2@63687a1a] * 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 7s
how did u fix it?
Please retry with version 4.4.2. This release should fix Android building issue with linter.
I got same issue with version 4.4.2 when I build Android
[✓] Flutter (Channel stable, 3.3.5, on macOS 13.0 22A380 darwin-arm, locale en-VN)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.0.1)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2021.3)
[✓] VS Code (version 1.72.2)
[✓] Connected device (3 available)
[✓] HTTP Host Availability
New attempt in 4.4.3. I really don't know what is going on with your configurations...
(by the way thank you so much for these updates, they work flawlessly !)