第一次,谷歌地图抖动,加载完美,但当热重启时,它进入平台异常
google_maps_flutter:^ 0.5.21 + 15
Github [google_maps_flutter]试图创建一个已经创建的平台视图#45695
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: PlatformException(error, java.lang.IllegalStateException: Trying to create an already created platform view, view id: 0
扑医生-v
[✓] Flutter (Channel stable, v1.12.13+hotfix.5, on Linux, locale en_IN) • Flutter version 1.12.13+hotfix.5 at /home/asus/Documents/Flutter_SDK/flutter • Framework revision 27321ebbad (2 weeks ago), 2019-12-10 18:15:01 -0800 • Engine revision 2994f7e1e6 • Dart version 2.7.0 [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2) • Android SDK at /home/asus/Android/Sdk • Android NDK location not configured (optional; useful for native profiling support) • Platform android-29, build-tools 29.0.2 • Java binary at: /snap/android-studio/81/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) • All Android licenses accepted. [✓] Android Studio (version 3.5) • Android Studio at /snap/android-studio/81/android-studio • Flutter plugin version 42.1.1 • Dart plugin version 191.8593 • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b49-5587405) [✓] Connected device (1 available) • vivo 1723 • 49269ad3 • android-arm64 • Android 9 (API 28) • No issues found!
为了解决这个问题,我通过终端进行了以下操作:
1-将分支更改为主分支:
flutter channel master
2-升级的颤振
flutter upgrade
3-清除代码:
flutter clean