uber_clone_with_flutter
uber_clone_with_flutter copied to clipboard
Valid value range is empty: 0
[ERROR:flutter/lib/ui/ui_dart_state.cc(148)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0
E/flutter ( 8073): #0 List.[] (dart:core-patch/growable_array.dart:147:60)
E/flutter ( 8073): #1 GoogleMapsServices.getRouteCoordinates (package:uber_clone/requests/google_maps_requests.dart:11:30)
E/flutter ( 8073):
Go to https://console.developers.google.com/apis/dashboard Click on the Menu -> google maps -> APIs In the search bar type "Directions API" enable it. Also, enable "Maps SDK for Android".
I hope this helps.
No,.. it shows d same error . I have enabled it and then tested . In google map console under the directions api it shows requests 118 and errors 118. That means it is hitting the Api but thers no response ...
@afreen009
yes me too and i have also enabled Roads API and Distance matrix API then tested it shows the same error
E/flutter (24208): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0 E/flutter (24208): #0 List.[] (dart:core-patch/growable_array.dart:146:60)
But when i printed json Data which is stored in Values it Says
I/flutter (24208): {error_message: This IP, site or mobile application is not authorized to use this API key. Request received from IP address 27.6.58.172, with empty referer, routes: [], status: REQUEST_DENIED}
my App is not authorized in first error msg pair But I Enabled the API Key for only Android Apps in API Key restrictions and for me also its hitting the directions API and resulting in error but it is not sending any data so thats why the routes list is empty and thas Why we are getting this range error .I Understood this that why its getting error but i have enabled API key for My App and also registered my app by giving project name and SHA1 certificate Key
How to solve this error Why its showing that my app is not authorized even when i registerd my app
I also face same error
[VERBOSE-2:ui_dart_state.cc(157)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0
#0 List.[] (dart:core-patch/growable_array.dart:146:60)
#1 GoogleMapsServices.getRouteCoordinates (package:testapp/request/google_maps_requests.dart:14:28)
yes me too have this problem and i have also enabled Roads API and Distance matrix API then tested it shows the same error
E/flutter (24208): [ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: RangeError (index): Invalid value: Valid value range is empty: 0 E/flutter (24208): #0 List.[] (dart:core-patch/growable_array.dart:146:60)
pls give the solution
E/flutter ( 8334): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: Exception: RangeError (index): Invalid value: Valid value range is empty: 0
E/flutter ( 8334): #0 NetworkUtil.getRouteBetweenCoordinates (package:flutter_polyline_points/src/network_util.dart:29:7)
E/flutter ( 8334):
im getting same problem. API is true and everything is okay. What is the problem? Any solution?