使用 Location plugin 获取使用者位置坐标时,出现 won’t run without google play services, which are not supported by your device 这样的错误信息,截图如下:
vs code DEBUG CONSOLE 输出:
W/GooglePlayServicesUtil( 7873): Google Play Store is missing.
E/GoogleApiAvailability( 7873): Google Play services is invalid. Cannot recover.
D/OpenGLRenderer( 7873): endAllActiveAnimators on 0xe6f8d990 (RippleDrawable) with handle 0xbb224ef0
W/GooglePlayServicesUtil( 7873): Google Play Store is missing.
解决办法是,重新创建一个带有Google Play Store 的模拟器。
如果所示,带有 Play Store 标志的 Pixel 4, Pixel 3a,Pixel 3 都是可以的:
使用新的模拟器,不再出现这样的错误信息。
https://stackoverflow.com/questions/69700936/flutter-application-wont-run-without-google-play-service