Skip to content

Build failure after upgrading to cloud_firestore 0.3.x #15972

@isoos

Description

@isoos

From @ITJammish on March 25, 2018 15:8

URL: https://pub.dartlang.org/packages/cloud_firestore#-readme-tab-

Hi, after upgrading to use the cloud firestore plugin 0.3.0 (and later) from 0.2.12. I have the following stacktrace on build:

Running "flutter packages get" in sampleproject...          0.6s
Launching lib/main.dart on Pixel 2 XL in debug mode...
Initializing gradle...                                0.7s
Resolving dependencies...                             0.9s
Running 'gradlew assembleDebug'...
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedFolders(FileCollection)
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
57: error: cannot inherit from final StandardMessageCodec
final class FirestoreMessageCodec extends StandardMessageCodec {
                                          ^
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:6
7: error: constructor StandardMethodCodec in class StandardMethodCodec cannot be applied to given types;
            new StandardMethodCodec(FirestoreMessageCodec.INSTANCE));
            ^
  required: no arguments
  found: FirestoreMessageCodec
  reason: actual and formal argument lists differ in length
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
57: error: StandardMessageCodec() has private access in StandardMessageCodec
final class FirestoreMessageCodec extends StandardMessageCodec {
      ^
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
64: error: method does not override or implement a method from a supertype
  @Override
  ^
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
68: error: cannot find symbol
      writeLong(stream, ((Date) value).getTime());
      ^
  symbol:   method writeLong(ByteArrayOutputStream,long)
  location: class FirestoreMessageCodec
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
71: error: cannot find symbol
      writeAlignment(stream, 8);
      ^
  symbol:   method writeAlignment(ByteArrayOutputStream,int)
  location: class FirestoreMessageCodec
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
72: error: cannot find symbol
      writeDouble(stream, ((GeoPoint) value).getLatitude());
      ^
  symbol:   method writeDouble(ByteArrayOutputStream,double)
  location: class FirestoreMessageCodec
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
73: error: cannot find symbol
      writeDouble(stream, ((GeoPoint) value).getLongitude());
      ^
  symbol:   method writeDouble(ByteArrayOutputStream,double)
  location: class FirestoreMessageCodec
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
76: error: cannot find symbol
      writeBytes(stream, ((DocumentReference) value).getPath().getBytes(UTF8));
      ^
  symbol:   method writeBytes(ByteArrayOutputStream,byte[])
  location: class FirestoreMessageCodec
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
78: error: writeValue(ByteArrayOutputStream,Object) is not public in StandardMessageCodec; cannot be accessed from outside package
      super.writeValue(stream, value);
           ^
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
82: error: method does not override or implement a method from a supertype
  @Override
  ^
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
88: error: cannot find symbol
        readAlignment(buffer, 8);
        ^
  symbol:   method readAlignment(ByteBuffer,int)
  location: class FirestoreMessageCodec
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
91: error: cannot find symbol
        final byte[] bytes = readBytes(buffer);
                             ^
  symbol:   method readBytes(ByteBuffer)
  location: class FirestoreMessageCodec
C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:5
95: error: cannot find symbol
        return super.readValueOfType(type, buffer);
                    ^
  symbol: method readValueOfType(byte,ByteBuffer)
Note: C:\Users\...\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.
java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
14 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.

Flutter Doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 10.0.16299.125], locale en-GB)
[√] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[√] Android Studio (version 3.0)
[√] Android Studio (version 3.0)
[√] IntelliJ IDEA Community Edition (version 2017.3)
[√] Connected devices (1 available)

• No issues found!

Copied from original issue: dart-lang/pub-dev#1146

Metadata

Metadata

Assignees

No one assigned

    Labels

    c: crashStack traces logged to the consolep: cloud_firestoreFirebase Firestore pluginpackageflutter/packages repository. See also p: labels.platform-androidAndroid applications specificallyt: gradle"flutter build" and "flutter run" on AndroidtoolAffects the "flutter" command-line tool. See also t: labels.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions