S. Yacko
S. Yacko

Reputation: 692

googleapis_auth/googleapis_auth.dart URI doesn't exist

I'm getting "Target of URI doesn't exist: 'package:googleapis_auth/googleapis_auth.dart'."

I need this library to grant roles to new users.

My pubspec.yaml has googleapis: 13.2.0 and I ran pub get. Here is the output:

Resolving dependencies...
Downloading packages...
+ _discoveryapis_commons 1.0.7
  async 2.11.0 (2.12.0 available)
  boolean_selector 2.1.1 (2.1.2 available)
  characters 1.3.0 (1.3.1 available)
  collection 1.18.0 (1.19.1 available)
  fake_async 1.3.1 (1.3.2 available)
  flutter_launcher_icons 0.13.1 (0.14.1 available)
  flutter_lints 4.0.0 (5.0.0 available)
  go_router 12.1.3 (14.3.0 available)
  google_fonts 6.1.0 (6.2.1 available)
  google_sign_in_android 6.1.30 (6.1.33 available)
  google_sign_in_ios 5.7.7 (5.7.8 available)
+ googleapis 13.2.0                   <===== It here
! http 1.2.2 (overridden)
  http_parser 4.0.2 (4.1.1 available)
  image 4.2.0 (4.3.0 available)
  js 0.6.7 (0.7.1 available)
  json_path 0.7.2 (0.7.4 available)
  leak_tracker 10.0.5 (10.0.8 available)
  leak_tracker_flutter_testing 3.0.5 (3.0.9 available)
  lints 4.0.0 (5.1.0 available)
  matcher 0.12.16+1 (0.12.17 available)
  material_color_utilities 0.11.1 (0.12.0 available)
  meta 1.15.0 (1.16.0 available)
  mime_type 1.0.0 (1.0.1 available)
  path 1.9.0 (1.9.1 available)
  path_provider_android 2.2.10 (2.2.12 available)
  path_provider_windows 2.2.1 (2.3.0 available)
  rxdart 0.27.7 (0.28.0 available)
  shared_preferences_android 2.3.2 (2.3.3 available)
  shared_preferences_foundation 2.5.2 (2.5.3 available)
  sign_in_with_apple 6.1.2 (6.1.3 available)
  sqflite 2.3.3+1 (2.4.0 available)
  sqflite_common 2.5.4+3 (2.5.4+5 available)
  stack_trace 1.11.1 (1.12.0 available)
  string_scanner 1.2.0 (1.4.0 available)
  synchronized 3.2.0 (3.3.0+3 available)
  test_api 0.7.2 (0.7.3 available)
  timeago 3.6.1 (3.7.0 available)
  url_launcher 6.3.0 (6.3.1 available)
  url_launcher_android 6.3.10 (6.3.13 available)
  url_launcher_windows 3.1.2 (3.1.3 available)
! uuid 4.5.1 (overridden)
  vm_service 14.2.5 (14.3.1 available)
Changed 2 dependencies!
40 packages have newer versions incompatible with dependency constraints.
Try `flutter pub outdated` for more information.
Process finished with exit code 0

I downloaded the google test code at https://github.com/google/googleapis.dart/blob/master/googleapis_auth/test/oauth2_flows/auth_code_test.dart

and I get the same issue.

I have reseted the IDE, remove googleapis from pubspec.yaml and readded it. Clean cache and still nothing is working.

Thank you in advance for your help.

Upvotes: 0

Views: 89

Answers (1)

Eric Martin
Eric Martin

Reputation: 550

googleapis and googleapis_auth are two different packages.

try flutter pub add googleapis_auth in your terminal

or

add googleapis_auth in your pubspec

WARNING

read the package description here : https://pub.dev/packages/googleapis_auth

especially :

Do NOT use this package (package:googleapis_auth) with a Flutter application.

Use package:extension_google_sign_in_as_googleapis_auth instead.

Upvotes: 1

Related Questions