googlecodelabs / photos-sharing

Code for the "Build a Photo Sharing app with Google Photos and Flutter" codelab
Apache License 2.0
98 stars 71 forks source link

Your Flutter application is created using an older version of the Android embedding. #28

Closed zacjordaan closed 3 years ago

zacjordaan commented 3 years ago

Receiving this warning:

Warning
──────────────────────────────────────────────────────────────────────────────
Your Flutter application is created using an older version of the Android
embedding. It's being deprecated in favor of Android embedding v2. Follow the
steps at

https://flutter.dev/go/android-project-migration

to migrate your project.

Have tried to follow the (complex) steps at the referred url, as well as creating a new project and copying source across. Endless trouble, no good result yet.

If anybody has any tips to get this codelab working, I'd appreciate your input.

jfschmakeit commented 3 years ago

It looks like we need to update the codelab based on this migration guide: https://github.com/flutter/flutter/wiki/Upgrading-pre-1.12-Android-projects

We will take a look - thanks for the report!

jfschmakeit commented 3 years ago

I have a change for this ready, it should be merged early next week.

Note that the app and the codelab continues to function as normal - this message is just an advisory warning. The functionality of the app should not be impacted.

@zacjordaan Did you notice any change in behaviour or did the app not work for you?

zacjordaan commented 3 years ago

Unfortunately the app did not work for me. Beyond the advisory warning, I found issues such as this:

/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:26: Error: Type 'DiagnosticableMixin' not found.
class PictureStream with DiagnosticableMixin {
                         ^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:44: Error: Type 'DiagnosticableMixin' not found.
abstract class PictureStreamCompleter with DiagnosticableMixin {
                                           ^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:88:7: Error: The type 'DiagnosticableMixin' can't be mixed in.
class PictureStream with DiagnosticableMixin {
      ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:192:16: Error: The type 'DiagnosticableMixin' can't be mixed in.
abstract class PictureStreamCompleter with DiagnosticableMixin {
               ^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:167:11: Error: Superclass has no method named 'debugFillProperties'.
    super.debugFillProperties(properties);
          ^^^^^^^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:171:30: Error: The method 'toStringShort' isn't defined for the class 'PictureStreamCompleter'.
 - 'PictureStreamCompleter' is from 'package:flutter_svg/src/picture_stream.dart' ('/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart').
Try correcting the name to the name of an existing method, or defining a method named 'toStringShort'.
      ifPresent: _completer?.toStringShort(),
                             ^^^^^^^^^^^^^
/C:/src/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.17.4/lib/src/picture_stream.dart:266:11: Error: Superclass has no method named 'debugFillProperties'.
    super.debugFillProperties(description);
          ^^^^^^^^^^^^^^^^^^^

After that, running .\gradlew build --stacktrace didn't provide any additional useful information that I could see.

I'll watch out for your change next week and perhaps try again, thank you.

M123-dev commented 3 years ago

@zacjordaan I had the same error, you have to change flutter_svg: in pubspec.yaml to ^0.18.1 and then run flutter pub get. This will fix the error. I check for compatibility and make a pull request.