解決flutter更新到1.17出現[google_maps_flutter] iOS - undefined symbols for architecture問題

報錯內容;

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_GMSMarker", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapMarkerController.o)
  "_OBJC_CLASS_$_GMSMutablePath", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapPolylineController.o)
  "_OBJC_CLASS_$_GMSCameraPosition", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_OBJC_CLASS_$_GMSCameraUpdate", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_OBJC_CLASS_$_GMSCoordinateBounds", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_OBJC_CLASS_$_GMSMapView", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapController.o)
  "_OBJC_CLASS_$_GMSPolyline", referenced from:
      objc-class-ref in google_maps_flutter(GoogleMapPolylineController.o)
  "_kGMSMinZoomLevel", referenced from:
      _InterpretMapOptions in google_maps_flutter(GoogleMapController.o)
  "_kGMSMaxZoomLevel", referenced from:
      _InterpretMapOptions in google_maps_flutter(GoogleMapController.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

更新到flutter 1.17之後出現這個問題,之前使用v1.12.13+hotfix.9正常,目前沒找到正確的解決辦法,所以只有回退到之前的版本,
解決方法:
1、回退到v1.12.13+hotfix.9
2、刪除掉Runner.xcworkspace
3、重新 pod install
4、重新運行

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章