Giter VIP home page Giter VIP logo

photos-sharing's Introduction

Moved: Google Photos Library API Sharing Codelab

The code for this codelab has moved to the flutter/codelabs repository on GitHub.

Follow the steps on https://codelabs.developers.google.com/codelabs/google-photos-sharing to get started.

License

Copyright 2019 Google LLC

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

photos-sharing's People

Contributors

cassierecher avatar guyo13 avatar jfschmakeit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

photos-sharing's Issues

Can't seem to get past google login, just see a spinning wait post google auth screens?

So followed up to step 4.
I don't get any errors and see the usual google signin and allow perms on the app authentication screens so that seems ok?
I just sit at a rotating green icon.... never getting to the Create/join trip album screen...

I did see that adding the scopes gives a " Needs verification
Because you're using one or more sensitive scopes, your app registration requires verification by Google.Please edit your app to submit for verification" would this cause the never really completes the signin?

cheers

Page7 question

Do you need these lines?

    // Get the filename of the image
    final String filename = path.basename(image.path);

    // Set up the headers required for this request.
    final Map<String, String> headers = <String, String>{};
    headers.addAll(await _authHeaders);
    headers['Content-type'] = 'application/octet-stream';
    headers['X-Goog-Upload-Protocol'] = 'raw';
    headers['X-Goog-Upload-File-Name'] = filename;

Because you are using "await _authHeaders" for "headers" parameter, I don't think those lines are necessary.

Getting this error after clicking my google account for signin on the photo-sharing-final code.

Unhandled Exception: NoSuchMethodError: The getter 'iterator' was called on null.
E/flutter (10059): Receiver: null
E/flutter (10059): Tried calling: iterator
E/flutter (10059): #0 Object.noSuchMethod (dart:core-patch/object_patch.dart:50:5)
E/flutter (10059): #1 ExpandIterator.moveNext (dart:_internal/iterable.dart:481:51)
E/flutter (10059): #2 __CompactLinkedHashSet&_HashFieldBase&_HashBase&_OperatorEqualsAndHashCode&SetMixin.addAll (dart:collection/set.dart:57:23)
E/flutter (10059): #3 PhotosLibraryApiModel.updateAlbums (package:sharing_codelab/model/photos_library_api_model.dart:173:13)
E/flutter (10059):
E/flutter (10059): #4 PhotosLibraryApiModel.signIn (package:sharing_codelab/model/photos_library_api_model.dart:70:5)
E/flutter (10059): #5 _asyncThenWrapperHelper. (dart:async-patch/async_patch.dart:77:64)
E/flutter (10059): #6 _rootRunUnary (dart:async/zone.dart:1132:38)
E/flutter (10059): #7 _CustomZone.runUnary (dart:async/zone.dart:1029:19)
E/flutter (10059): #8 _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
E/flutter (10059): #9 Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
E/flutter (10059): #10 Future._propagateToListeners (dart:async/future_impl.dart:668:32)
E/flutter (10059): #11 Future._completeWithValue (dart:async/future_impl.dart:483:5)
E/flutter (10059): #12 Future._asyncComplete. (dart:async/future_impl.dart:513:7)
E/flutter (10059): #13 _rootRun (dart:async/zone.dart:1124:13)
E/flutter (10059): #14 _CustomZone.run (dart:async/zone.dart:1021:19)
E/flutter (10059): #15 _CustomZone.runGuarded (dart:async/zone.dart:923:7)
E/flutter (10059): #16 _CustomZone.bindCallbackGuarded. (dart:async/zone.dart:963:23)
E/flutter (10059): #17 _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
E/flutter (10059): #18 _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
E/flutter (10059):

Sing in error

The problem arose:

PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 12500: , null)

I was able to solve it with enable the Google Sign-in method in the Authentication tab in Firebase console.

I found the solution here:
https://stackoverflow.com/a/56488089/11754194

Google sign-in error, configuration questions.

I finished setting up the Firebase and setting up the Google Cloud platform(photo).
However, can't sign-in.

I think it's strange that the Google Cloud platform project has a different name from the Firebase project.

The Firebase 'PlayGround' project was created to use the FireStore, and the 'PracticeProject' on the Google Cloud platform was created to use Google map.
Is this a problem?

Note: In [IAM & admin - IAM] section, 'PlayGround' are included in the 'PracticeProject' permission member list. I don't know how it got in.

And one more strange thing.
I set up the use of Google Photos Library and set the OAuth content screen.

But, In [APIs & Service - Photos Library API - Overview] section, They show
[To use this API, you may need credentials. Click 'Create credentials' to get started] notification.

I press the 'Create credentials' button and follow the instructions:

image

then GCP say you have to create an OAuth 2.0 client ID.
But SHA-1 key and android package is already in use.

What exactly is the problem?

App taking too long to run

After cloning the code and getting all the packages, the app wont run. Stuck at ''Running Gradle task 'assembleDebug'...''
What are the possible reasons for this please?

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

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.

I cannot run this project: Error retrieving device properties for ro.product.cpu.abi

Flutter crash report; please file at https://github.com/flutter/flutter/issues.

command

flutter run

exception

ProcessException: ProcessException: Process "C:\Users\suuso\Downloads\Compressed\photos-sharing-final\android\gradlew.bat" exited abnormally:
Exception in thread "main" java.lang.NullPointerException
at org.gradle.wrapper.BootstrapMainStarter.findLauncherJar(BootstrapMainStarter.java:34)
at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:25)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:129)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Command: C:\Users\suuso\Downloads\Compressed\photos-sharing-final\android\gradlew.bat -v

#0      runCheckedAsync (package:flutter_tools/src/base/process.dart:255:5)
<asynchronous suspension>
#1      _initializeGradle (package:flutter_tools/src/android/gradle.dart:221:9)
<asynchronous suspension>
#2      _ensureGradle (package:flutter_tools/src/android/gradle.dart:202:37)
<asynchronous suspension>
#3      _readGradleProject (package:flutter_tools/src/android/gradle.dart:130:31)
<asynchronous suspension>
#4      _gradleProject (package:flutter_tools/src/android/gradle.dart:107:34)
<asynchronous suspension>
#5      getGradleAppOut (package:flutter_tools/src/android/gradle.dart:101:29)
<asynchronous suspension>
#6      AndroidApk.fromAndroidProject (package:flutter_tools/src/application_package.dart:157:23)
<asynchronous suspension>
#7      ApplicationPackageFactory.getPackageForPlatform (package:flutter_tools/src/application_package.dart:47:32)
<asynchronous suspension>
#8      FlutterDevice.runHot (package:flutter_tools/src/resident_runner.dart:351:56)
<asynchronous suspension>
#9      HotRunner.run (package:flutter_tools/src/run_hot.dart:253:39)
<asynchronous suspension>
#10     RunCommand.runCommand (package:flutter_tools/src/commands/run.dart:430:37)
<asynchronous suspension>
#11     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:488:18)
#12     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#13     _rootRunUnary (dart:async/zone.dart:1132:38)
#14     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#15     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#16     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#17     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#18     Future._complete (dart:async/future_impl.dart:473:7)
#19     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#20     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:28:18)
#21     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:294:13)
#22     RunCommand.usageValues (package:flutter_tools/src/commands/run.dart)
#23     _asyncThenWrapperHelper.<anonymous closure> (dart:async-patch/async_patch.dart:77:64)
#24     _rootRunUnary (dart:async/zone.dart:1132:38)
#25     _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#26     _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#27     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#28     Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#29     Future._complete (dart:async/future_impl.dart:473:7)
#30     _SyncCompleter.complete (dart:async/future_impl.dart:51:12)
#31     _AsyncAwaitCompleter.complete.<anonymous closure> (dart:async-patch/async_patch.dart:33:20)
#32     _rootRun (dart:async/zone.dart:1124:13)
#33     _CustomZone.run (dart:async/zone.dart:1021:19)
#34     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#35     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#36     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#37     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#38     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

flutter doctor

�[32m[✓]�[39m Flutter (Channel beta, v1.6.3, on Microsoft Windows [Version 10.0.17763.503], locale en-GB)
    �[32m•�[39m Flutter version 1.6.3 at C:\Apps\flutter
    �[32m•�[39m Framework revision bc7bc94083 (3 weeks ago), 2019-05-23 10:29:07 -0700
    �[32m•�[39m Engine revision 8dc3a4cde2
    �[32m•�[39m Dart version 2.3.2 (build 2.3.2-dev.0.0 e3edfd36b2)

�[33m[!]�[39m Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    �[32m•�[39m Android SDK at C:\Users\suuso\AppData\Local\Android\sdk
    �[32m•�[39m Android NDK location not configured (optional; useful for native profiling support)
    �[32m•�[39m Platform android-28, build-tools 28.0.3
    �[32m•�[39m Java binary at: C:\Users\suuso\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-1\183.5522156\jre\bin\java
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    �[31m✗�[39m Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed instructions.

�[32m[✓]�[39m Android Studio (version 3.4)
    �[32m•�[39m Android Studio at C:\Users\suuso\AppData\Local\JetBrains\Toolbox\apps\AndroidStudio\ch-1\183.5522156
    �[32m•�[39m Flutter plugin version 36.0.1
    �[32m•�[39m Dart plugin version 183.6270
    �[32m•�[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

�[32m[✓]�[39m IntelliJ IDEA Ultimate Edition (version 2018.2)
    �[32m•�[39m IntelliJ at C:\Program Files\JetBrains\IntelliJ IDEA 2018.2.2
    �[32m•�[39m Flutter plugin version 31.3.3
    �[32m•�[39m Dart plugin version 182.5124

�[33m[!]�[39m IntelliJ IDEA Ultimate Edition (version 2019.1)
    �[32m•�[39m IntelliJ at C:\Users\suuso\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\191.7141.44
    �[31m✗�[39m Flutter plugin not installed; this adds Flutter specific functionality.
    �[31m✗�[39m Dart plugin not installed; this adds Dart specific functionality.
    �[32m•�[39m For information about installing plugins, see
      https://flutter.dev/intellij-setup/#installing-the-plugins

�[32m[✓]�[39m VS Code (version 1.35.0)
    �[32m•�[39m VS Code at C:\Users\suuso\AppData\Local\Programs\Microsoft VS Code
    �[32m•�[39m Flutter extension version 3.1.0

�[32m[✓]�[39m Connected device (1 available)
    �[32m•�[39m Android SDK built for x86 • emulator-5554 • android-arm • Android null (API null)

�[33m!�[39m Doctor found issues in 2 categories.

Compilation Error: DiagnosticsNode

Compiler message:
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/svg.dart:158:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
        context: 'picture failed to precache',
                 ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:335:20: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
          context: 'while resolving a picture',
                   ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:337:33: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
          informationCollector: (StringBuffer information) {
                                ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:432:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
        informationCollector: (StringBuffer information) {
                              ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:495:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
        informationCollector: (StringBuffer information) {
                              ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:559:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
        informationCollector: (StringBuffer information) {
                              ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_stream.dart:256:16: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: context,
               ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_stream.dart:301:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
        context: 'resolving a single-frame picture stream',
                 ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/cached_network_image-0.7.0/lib/src/cached_network_image_provider.dart:46:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
        informationCollector: (StringBuffer information) {
                              ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:399:35: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
            informationCollector: (StringBuffer buff) {
                                  ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:408:22: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
            context: 'in _Element.clipPath',
                     ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:798:31: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
        informationCollector: (StringBuffer buff) {
                              ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/svg/parser_state.dart:809:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
        context: 'in parseSvgElement',
                 ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/utilities/errors.dart:8:32: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
      context: 'in $methodName',
                               ^
file:///C:/Apps/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/utilities/errors.dart:10:29: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.
 - 'Iterable' is from 'dart:core'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///C:/Apps/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
      informationCollector: (StringBuffer buff) {
                            ^
Compiler failed on C:\Users\suuso\Downloads\Compressed\photos-sharing-final\lib/main.dart
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        37.8s
Gradle task assembleDebug failed with exit code 1

Execution failed for task ':app:preDebugBuild'.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:preDebugBuild'.

Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.2) classpath. You should manually set the same version via DependencyResolution

  • 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 11s


The Gradle failure may have been because of AndroidX incompatibilities in this Flutter app.
See https://goo.gl/CP92wY for more information on the problem and how to fix it.


Gradle task assembleDebug failed with exit code 1

No Gradle sync

Step 4 mentions that after altering the .gradle scripts, a "sync Gradle..." yellow bar should appear. That does not happen. Furthermore, the "sync Gradle" button seems to be missing both from the toolbar and from the File menu.

Google SignIn Error

PlatformException(sign_in_failed, com.google.android.gms.common.api.ApiException: 10: , null). I found this errors . Please help me how can I solve this?

project does not build

I run

git clone https://github.com/googlecodelabs/photos-sharing.git
cd photos-sharing
flutter run

And I get a long string of errors like so:

file:///usr/local/google/home/lwisne/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/svg.dart:158:18: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///usr/local/google/home/lwisne/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
        context: 'picture failed to precache',                          
                 ^                                                      
file:///usr/local/google/home/lwisne/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:335:20: Error: The argument type 'String' can't be assigned to the parameter type 'DiagnosticsNode'.
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///usr/local/google/home/lwisne/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'DiagnosticsNode'.
          context: 'while resolving a picture',                         
                   ^                                                    
file:///usr/local/google/home/lwisne/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.12.4+1/lib/src/picture_provider.dart:337:33: Error: The argument type 'Null Function(StringBuffer)' can't be assigned to the parameter type 'Iterable<DiagnosticsNode> Function()'.
 - 'StringBuffer' is from 'dart:core'.                                  
 - 'Iterable' is from 'dart:core'.                                      
 - 'DiagnosticsNode' is from 'package:flutter/src/foundation/diagnostics.dart' ('file:///usr/local/google/home/lwisne/flutter/packages/flutter/lib/src/foundation/diagnostics.dart').
Try changing the type of the parameter, or casting the argument to 'Iterable<DiagnosticsNode> Function()'.
          informationCollector: (StringBuffer information) {

(this goes on for a while, cut off for brevity)

Any thoughts on what to do?

Uploading photo issue

When I click Add Photo
and then Upload photo
It does not show image selector but shows an error that camera is not available.
image

Step #3 Running the App throws Localizations.localeOf(context, nullOk: true) : null

Step #3 Running the App from Github throws exception

IntelliJ IDEA 2021.1 (Ultimate Edition)
Build #IU-211.6693.111, built on April 6, 2021
Runtime version: 11.0.10+9-b1341.35 x86_64
VM: Dynamic Code Evolution 64-Bit Server VM by JetBrains s.r.o.
macOS 11.3
GC: G1 Young Generation, G1 Old Generation
Memory: 2048M
Cores: 16
Non-Bundled Plugins: Dart (211.7233), io.flutter (55.1.5)
Kotlin: 211-1.4.32-release-IJ6693.72

flutter --version
Flutter 2.0.5 • channel stable • https://github.com/flutter/flutter.git
Framework • revision adc687823a (12 days ago) • 2021-04-16 09:40:20 -0700
Engine • revision b09f014e96
Tools • Dart 2.12.3

Launching lib/main.dart on sdk gphone x86 arm in debug mode...
Running Gradle task 'assembleDebug'...
/usr/local/Caskroom/flutter/2.0.4/flutter/.pub-cache/hosted/pub.dartlang.org/flutter_svg-0.19.1/lib/src/picture_provider.dart:52:59: Error: No named parameter with the name 'nullOk'.
context != null ? Localizations.localeOf(context, nullOk: true) : null,
^^^^^^
/usr/local/Caskroom/flutter/2.0.4/flutter/packages/flutter/lib/src/widgets/localizations.dart:413:17: Context: Found this candidate, but the arguments don't match.
static Locale localeOf(BuildContext context) {
^^^^^^^^

FAILURE: Build failed with an exception.

  • Where:
    Script '/usr/local/Caskroom/flutter/2.0.4/flutter/packages/flutter_tools/gradle/flutter.gradle' line: 991

  • What went wrong:
    Execution failed for task ':app:compileFlutterBuildDebug'.

Process 'command '/usr/local/Caskroom/flutter/2.0.4/flutter/bin/flutter'' finished with non-zero exit value 1

  • 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 11s
Exception: Gradle task assembleDebug failed with exit code 1

The screenshot is wrong.

There explain that google-service.json file should be placed under "android/app/" on page google-photos-sharing/#3.

But screenshot seems to be placed under "android/app/src/".

Build Failing

Running the following commands:
git clone https://github.com/googlecodelabs/photos-sharing.git
cd photos-sharing
flutter run

Produces the below results. The first thing I tried was migrate to AndroidX but it had no impact.

Using hardware rendering with device AOSP on IA Emulator. If you get graphics artifacts, consider enabling software
rendering with "--enable-software-rendering".
Launching lib\main.dart on AOSP on IA Emulator in debug mode...
[!] Your app isn't using AndroidX.
    To avoid potential build failures, you can quickly migrate your app by following the steps on https://goo.gl/CP92wY.

Compiler message:
../AppData/Roaming/Pub/Cache/hosted/pub.dartlang.org/cached_network_image-1.1.3/lib/src/cached_network_image_provider.dart:42:24: Error: The method 'CachedNetworkImageProvider.load' has fewer positional arguments than those of overridden method 'ImageProvider.load'.
  ImageStreamCompleter load(CachedNetworkImageProvider key) {
                       ^
/C:/Program%20Files/Flutter/flutter/packages/flutter/lib/src/painting/image_provider.dart:403:24: Context: This is the overridden method ('load').
  ImageStreamCompleter load(T key, DecoderCallback decode);
                       ^
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
build failed.

FAILURE: Build failed with an exception.

* Where:
Script 'C:\Program Files\Flutter\flutter\packages\flutter_tools\gradle\flutter.gradle' line: 780

* What went wrong:
Execution failed for task ':app:compileFlutterBuildDebug'.
> Process 'command 'C:\Program Files\Flutter\flutter\bin\flutter.bat'' finished with non-zero exit value 1

* 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 10s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        11.1s
Gradle task assembleDebug failed with exit code 1

Error: Not found: 'dart:ui'

I've tried a dozen StackOverflow solutions and still can't fix this.
After making certain the Flutter and Dart frameworks are correctly set in Android Studio. And after running Pub get, when I run the code I see this

/Users/../flutter/bin/cache/dart-sdk/bin/dart --enable-asserts --enable-vm-service:60098 /Users/../photos-sharing/lib/main.dart
Observatory listening on http://127.0.0.1:60098/HpLS1OpjPk8=/

lib/main.dart: Warning: Interpreting this as package URI, 'package:sharing_codelab/main.dart'.
../flutter/packages/flutter/lib/src/material/animated_icons.dart:9:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui show Paint, Path, Canvas;
       ^
../flutter/packages/flutter/lib/src/material/animated_icons.dart:10:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
       ^
../flutter/packages/flutter/lib/src/material/app.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' as ui;
       ^
../flutter/packages/flutter/lib/src/material/app_bar_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
       ^
../flutter/packages/flutter/lib/src/material/arc.dart:6:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
       ^
../flutter/packages/flutter/lib/src/material/bottom_app_bar_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
       ^
../flutter/packages/flutter/lib/src/material/bottom_sheet.dart:6:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
       ^
../flutter/packages/flutter/lib/src/material/bottom_sheet_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
       ^
../flutter/packages/flutter/lib/src/material/button_bar_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;
       ^
../flutter/packages/flutter/lib/src/material/card_theme.dart:5:8: Error: Not found: 'dart:ui'
import 'dart:ui' show lerpDouble;

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.