Flutter cloud_firestore error: не удается найти символ> @Nullable - PullRequest
1 голос
/ 18 марта 2019
Launching lib/main.dart on Lenovo K8 Plus in debug mode... /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:8: error: package androidx.annotation does not exist import androidx.annotation.NonNull;
                          ^ /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:9: error: package androidx.annotation does not exist import androidx.annotation.Nullable;
                          ^ /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/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 /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/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 /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/android/src/main/java/io/flutter/plugins/firebase/cloudfirestore/CloudFirestorePlugin.java:272: error: cannot find symbol
                    @Nullable
                     ^   symbol: class Nullable /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/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 /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/cloud_firestore-0.8.2+3/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 20s Gradle task assembleDebug failed with exit code 1 Exited (sigterm) <br>

Launching lib/main.dart on Lenovo K8 Plus in debug mode... /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/fluttertoast-2.2.11/android/src/main/java/io/github/ponnamkarthik/toast/fluttertoast/FluttertoastPlugin.java:14: error: package android.support.v4.content does not exist import android.support.v4.content.ContextCompat;
                                 ^ /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/fluttertoast-2.2.11/android/src/main/java/io/github/ponnamkarthik/toast/fluttertoast/FluttertoastPlugin.java:107: error: cannot find symbol
          Drawable shapeDrawable = ContextCompat.getDrawable(ctx, R.drawable.toast_bg);
                                   ^   symbol:   variable ContextCompat   location: class FluttertoastPlugin 2 errors

FAILURE: Build failed with an exception.

* What went wrong: Execution failed for task ':fluttertoast: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 6s Gradle task assembleDebug failed with exit code 1 Exited (sigterm)


Launching lib/main.dart on Lenovo K8 Plus in debug mode... /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/fluttertoast-2.2.11/android/src/main/java/io/github/ponnamkarthik/toast/fluttertoast/FluttertoastPlugin.java:14: error: package android.support.v4.content does not exist import android.support.v4.content.ContextCompat;
                                 ^ /home/midhilaj/.pub-cache/hosted/pub.dartlang.org/fluttertoast-2.2.11/android/src/main/java/io/github/ponnamkarthik/toast/fluttertoast/FluttertoastPlugin.java:107: error: cannot find symbol
          Drawable shapeDrawable = ContextCompat.getDrawable(ctx, R.drawable.toast_bg);
                                   ^   symbol:   variable ContextCompat   location: class FluttertoastPlugin 2 errors

FAILURE: Build failed with an exception.

* What went wrong: Execution failed for task ':fluttertoast: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 6s Gradle task assembleDebug failed with exit code 1 Exited (sigterm)

  banner: ^0.1.3
  cloud_firestore: ^0.8.2  

  http: ^0.12.0
    # The following adds the Cupertino Icons font to your application.
  # Use with the CupertinoIcons class for iOS style icons.
  cupertino_icons: ^0.1.2
  #sqflite: any
  sqflite: ^0.13.0+1
  folding_cell: "^0.1.0"
  flutter_rating: ^0.0.2
  firebase_auth:  ^0.6.6
  firebase_database: ^1.0.5 
  fluttertoast: ^2.1.5
  progress_hud: ^1.1.0
  auto_size_text: ^0.3.0
  mongo_dart: ^0.3.4
  google_sign_in: ^3.0.4
  material_search: ^0.2.8
  flutter_secure_storage: ^3.1.2
  modal_progress_hud: ^0.1.2
  flutter_typeahead: ^0.4.1
  flutter_facebook_login: ^1.1.1
  flutter_firebase_ui: ^0.0.13
  json_serializable: ^2.0.1
  flutter_spinkit: "^3.1.0"
  splashscreen: ^1.1.0
  shared_preferences: ^0.4.3
  badges: ^0.0.6
...