web-dev-qa-db-ja.com

エラーで終了:GradleタスクassemblyDebugが終了コード1で失敗しました

Launching lib\main.Dart on HTC One M9PLUS 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\cloud_firestore-0.9.0\Android\src\main\Java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.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\cloud_firestore-0.9.0\Android\src\main\Java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.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\cloud_firestore-0.9.0\Android\src\main\Java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.Java:253: error: cannot find symbol
          public void onFailure(@NonNull Exception e) {
                                 ^   symbol: class NonNull C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.9.0\Android\src\main\Java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.Java:274: error: cannot find symbol
                    public Void apply(@NonNull Transaction transaction)
                                       ^   symbol: class NonNull C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.9.0\Android\src\main\Java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.Java:272: error: cannot find symbol
                    @Nullable
                     ^   symbol: class Nullable C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.9.0\Android\src\main\Java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.Java:503: error: cannot find symbol
                    public void onFailure(@NonNull Exception e) {
                                           ^   symbol: class NonNull C:\flutter\.pub-cache\hosted\pub.dartlang.org\cloud_firestore-0.9.0\Android\src\main\Java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.Java:558: error: cannot find symbol
                    public void onFailure(@NonNull Exception e) {
                                           ^   symbol: class NonNull 7 errors

FAILURE: Build failed with an exception.

* What went wrong: Execution failed for task ':cloud_firestore: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 26s Finished with error: Gradle task assembleDebug failed with exit code 1

プロジェクトにfirebaseを追加しようとしました

エラーからのエラーGradleパッケージバージョン修正パッケージの更新

ステップ1:フォルダを開くGradle Path C:\Users\{YourUserName}\.gradle\wrapper\dists次に、バージョンをチックします。

古い場合は、gradle.orgから更新してください

Grandle New Version Download

最新バージョンをダウンロードZipファイルおよびファイルを受け入れて置換.

ANDRIOD STEDIOを開いて実行します

0
Omar bakhsh

このパスを挿入C:\Program Files\Android\Android Studio\jre\bin環境変数内[システム変数] may be it's work

0
Harshit Bisht