Gradle Build Failure

287 views
Skip to first unread message

Sam Bartlett

unread,
Apr 2, 2018, 11:25:24 AM4/2/18
to flutt...@googlegroups.com

Hi,


I'm getting the following log error when I try and connect Firestore to Android Studio running Flutter....? Any help would be greatly appreciated; I've tried doing all the things recommended on Stack Overflow!


Thanks

Sam



C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:557: error: cannot inherit from final StandardMessageCodec
final class FirestoreMessageCodec extends StandardMessageCodec {
                                          ^
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:67: 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\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:557: error: StandardMessageCodec() has private access in StandardMessageCodec
final class FirestoreMessageCodec extends StandardMessageCodec {
      ^
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:564: error: method does not override or implement a method from a supertype
  @Override
  ^
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:568: error: cannot find symbol
      writeLong(stream, ((Date) value).getTime());
      ^
  symbol:   method writeLong(ByteArrayOutputStream,long)
  location: class FirestoreMessageCodec
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:571: error: cannot find symbol
      writeAlignment(stream, 8);
      ^
  symbol:   method writeAlignment(ByteArrayOutputStream,int)
  location: class FirestoreMessageCodec
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:572: error: cannot find symbol
      writeDouble(stream, ((GeoPoint) value).getLatitude());
      ^
  symbol:   method writeDouble(ByteArrayOutputStream,double)
  location: class FirestoreMessageCodec
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:573: error: cannot find symbol
      writeDouble(stream, ((GeoPoint) value).getLongitude());
      ^
  symbol:   method writeDouble(ByteArrayOutputStream,double)
  location: class FirestoreMessageCodec
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:576: error: cannot find symbol
      writeBytes(stream, ((DocumentReference) value).getPath().getBytes(UTF8));
      ^
  symbol:   method writeBytes(ByteArrayOutputStream,byte[])
  location: class FirestoreMessageCodec
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:578: error: writeValue(ByteArrayOutputStream,Object) is not public in StandardMessageCodec; cannot be accessed from outside package
      super.writeValue(stream, value);
           ^
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:582: error: method does not override or implement a method from a supertype
  @Override
  ^
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:588: error: cannot find symbol
        readAlignment(buffer, 8);
        ^
  symbol:   method readAlignment(ByteBuffer,int)
  location: class FirestoreMessageCodec
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:591: error: cannot find symbol
        final byte[] bytes = readBytes(buffer);
                             ^
  symbol:   method readBytes(ByteBuffer)
  location: class FirestoreMessageCodec
C:\Users\Sam\AppData\Roaming\Pub\Cache\hosted\pub.dartlang.org\cloud_firestore-0.3.2\android\src\main\java\io\flutter\plugins\firebase\cloudfirestore\CloudFirestorePlugin.java:595: error: cannot find symbol
        return super.readValueOfType(type, buffer);
                    ^
  symbol: method readValueOfType(byte,ByteBuffer)
Note: C:\Users\Sam\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.

Mikkel Ravn

unread,
Apr 2, 2018, 12:22:50 PM4/2/18
to bartl...@hotmail.com, Flutter Dev
Since version 0.3.1, cloud_firestore has depended on https://github.com/flutter/flutter/pull/15414 being part of the Flutter SDK you are using.
That change is so far only available on Flutter master.

Seems we have failed to upgrade the Flutter SDK constraint accordingly. I'll make sure we fix that.

In the meantime, either downgrade your cloud_firestore dependency to 0.3.0, or upgrade your Flutter SDK to use the master version.

--
You received this message because you are subscribed to the Google Groups "Flutter Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to flutter-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Mikkel Nygaard Ravn
Software Engineer

Reply all
Reply to author
Forward
0 new messages