Running "flutter packages get" in smart_diet_flutter... 2.6s
Launching lib\main.dart on ONEPLUS A6003 in debug mode...
Initializing gradle...
Resolving dependencies...
Gradle task 'assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:9: error: cannot find symbol
import androidx.annotation.NonNull;
^
symbol: class NonNull
location: package androidx.annotation
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:10: error: cannot find symbol
import androidx.annotation.Nullable;
^
symbol: class Nullable
location: package androidx.annotation
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:638: error: cannot find symbol
private void reportException(Result result, @Nullable Exception exception) {
^
symbol: class Nullable
location: class FirebaseAuthPlugin
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:550: error: cannot find symbol
public void onComplete(@NonNull Task<AuthResult> task) {
^
symbol: class NonNull
location: class FirebaseAuthPlugin.SignInCompleteListener
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:569: error: cannot find symbol
public void onComplete(@NonNull Task<Void> task) {
^
symbol: class NonNull
location: class FirebaseAuthPlugin.TaskVoidCompleteListener
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:587: error: cannot find symbol
public void onComplete(@NonNull Task<SignInMethodQueryResult> task) {
^
symbol: class NonNull
location: class FirebaseAuthPlugin.GetSignInMethodsCompleteListener
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:186: error: cannot find symbol
public void onComplete(@NonNull Task<AuthResult> task) {
^
symbol: class NonNull
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:445: error: cannot find symbol
public void onComplete(@NonNull Task<GetTokenResult> task) {
^
symbol: class NonNull
C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java:499: error: cannot find symbol
public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {
^
symbol: class NonNull
Note: C:\flutter\.pub-cache\hosted\pub.dartlang.org\firebase_auth-0.8.0\android\src\main\java\io\flutter\plugins\firebaseauth\FirebaseAuthPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
9 errors
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':firebase_auth:compileDebugJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* 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 22s
Finished with error: Gradle task assembleDebug failed with exit code 1
我使用InteliJ作为IDE与flutter项目和我的pubspec.yaml如下所示:
name: smart_diet_flutter
description: A new Flutter project.
# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# Read more about versioning at semver.org.
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
firebase_auth: 0.8.0
firebase_database: 1.1.0+1
dev_dependencies:
flutter_test:
sdk: flutter
# For information on the generic Dart part of this file, see the
# following page: https://www.dartlang.org/tools/pub/pubspec
# The following section is specific to Flutter.
flutter:
# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true
# To add assets to your application, add an assets section, like this:
# assets:
# - images/a_dot_burr.jpeg
# - images/a_dot_ham.jpeg
# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.io/assets-and-images/#resolution-aware.
# For details regarding adding assets from package dependencies, see
# https://flutter.io/assets-and-images/#from-packages
# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
# fonts:
# - family: Schyler
# fonts:
# - asset: fonts/Schyler-Regular.ttf
# - asset: fonts/Schyler-Italic.ttf
# style: italic
# - family: Trajan Pro
# fonts:
# - asset: fonts/TrajanPro.ttf
# - asset: fonts/TrajanPro_Bold.ttf
# weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.io/custom-fonts/#from-packages
assets:
- assets/flutter-icon.png
您要么需要迁移到AndroidX,要么降级到与AndroidX之前兼容的插件版本。
请关注https://github.com/flutter/flutter/issues/27106有关迁移的问题(另请参见https://github.com/flutter/flutter/issues/27146和https://github.com/flutter/flutter/issues/27128,以获得与问题相同的错误输出)
另见
try:使用--stacktrace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。使用--scan运行以获得完整的洞察力。 在https://help.gradle.org获得更多帮助 生成失败,14s完成,错误:Gradle task assembleDebug失败,退出代码为1 编辑:关于我的完整日志,您可以在这里看到: 颤振github问题
我试图构建我的flutter应用程序的版本变体,但我得到了这个梯度错误。请帮忙 java.util.concurrent.executionexception:com.Android.builder.internal.aapt.v2.aapt2exception:Android资源链接失败 /users/omotayo/lasumonitor/build/location/intermediate
每次我创建一个新的flutter项目并试图在虚拟设备上运行它时,我总是得到这个错误消息 任务“:app:CompressDebugAssets”执行失败。 Gradle-Wrapper.属性 distributionURL=https://services.gradle.org/distributions/gradle-6.7-all.zip 到
找不到任何解决方案: 问题所在:任务':device_information: parseDebugLocalResources'执行失败。 无法解析配置的所有文件:device_information: androidApis。无法转换android.jar以匹配属性{artifactType=android-Platform-attr,org.gradle.libraryelements=ja
我对编程不熟悉,对颤动和火力基地也不熟悉。我正在试验这个代码(https://github.com/tattwei46/flutter_login_demo),但是我遇到了一个错误。一切都应该是一样的,除了我改变了google-service.json和谷歌ervice.plist与我的Firebase应用程序相匹配,我编辑了home-page.dart.以下是打印出来的内容: AGPBI:{种类