无法在 com.android.build.gradle.LibraryExtension 类型的对象上找到参数 [] 的方法 buildFeatures()
Could not find method buildFeatures() for arguments [] on object of type com.android.build.gradle.LibraryExtension
我将包 'qr_code_scanner: ^0.5.1' 添加到我的 pubspec.yaml。
重新启动我的应用程序后,出现以下错误:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-
0.5.1\android\build.gradle' line: 39
* What went wrong:
A problem occurred evaluating project ':qr_code_scanner'.
> Could not find method buildFeatures() for arguments
[build_983ew3001pu1n91tvzyoag4vc$_run_closure2$_closure7@3a00d2ee] on object of type
com.android.build.gradle.LibraryExtension.
* 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 2s
Exception: Gradle task assembleDebug failed with exit code 1
我的颤振医生:
enter image description here
真不知道是什么原因导致的错误。
谢谢大家的回复!
停止项目
删除文件夹(C:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-
0.5.1
更改为版本“qr_code_scanner: ^0.4.0”,
运行 flutter pub get
运行 再次项目
对我来说它有效
我将包 'qr_code_scanner: ^0.5.1' 添加到我的 pubspec.yaml。
重新启动我的应用程序后,出现以下错误:
FAILURE: Build failed with an exception.
* Where:
Build file 'C:\Flutter\flutter\.pub-cache\hosted\pub.dartlang.org\qr_code_scanner-
0.5.1\android\build.gradle' line: 39
* What went wrong:
A problem occurred evaluating project ':qr_code_scanner'.
> Could not find method buildFeatures() for arguments
[build_983ew3001pu1n91tvzyoag4vc$_run_closure2$_closure7@3a00d2ee] on object of type
com.android.build.gradle.LibraryExtension.
* 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 2s
Exception: Gradle task assembleDebug failed with exit code 1
我的颤振医生:
enter image description here
真不知道是什么原因导致的错误。
谢谢大家的回复!
停止项目
删除文件夹(C:\Flutter\flutter.pub-cache\hosted\pub.dartlang.org\qr_code_scanner- 0.5.1
更改为版本“qr_code_scanner: ^0.4.0”,
运行 flutter pub get
运行 再次项目
对我来说它有效