Undefined symbol: _OBJC_CLASS_$_GMSCameraPosition

huangapple go评论71阅读模式
英文:

Undefined symbol: _OBJC_CLASS_$_GMSCameraPosition

问题

以下是您要翻译的代码部分:

我在SwiftUI中遇到了GoogleMaps SDK的一些问题
我手动安装了SDK,因为CocoaPods在我的Mac上无法工作
但现在我遇到了构建问题:

显示最近的消息
忽略文件/Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsCore.framework/GoogleMapsCore,该文件是通用的(arm64),但不包含x86_64架构/Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsCore.framework/GoogleMapsCore

忽略文件/Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsBase.framework/GoogleMapsBase,该文件是通用的(arm64),但不包含x86_64架构/Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsBase.framework/GoogleMapsBase

忽略文件/Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMaps.framework/GoogleMaps,该文件是通用的(arm64),但不包含x86_64架构/Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMaps.framework/GoogleMaps

未定义的符号:_OBJC_CLASS_$_GMSCameraPosition

未定义的符号:_OBJC_CLASS_$_GMSMapView

未定义的符号:_OBJC_CLASS_$_GMSServices

这是我尝试的代码:

import UIKit
import GoogleMaps
import SwiftUI
struct GoogleMapsView: UIViewRepresentable {
   private let zoom: Float = 15.0
   func makeUIView(context: Self.Context) -> GMSMapView {
      let camera = GMSCameraPosition.camera(withLatitude: -33.86, longitude: 151.20, zoom: 6.0)
      let mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
      return mapView
}

这里是“OTHER LINKER FLAGS”:
Undefined symbol: _OBJC_CLASS_$_GMSCameraPosition

英文:

I'm having some issues with the GoogleMaps SDK in SwiftUI.
I manually installed the SDK, because cocoa pods don't work on my Mac.
But now I have building issues:

Showing Recent Messages
Ignoring file /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsCore.framework/GoogleMapsCore, file is universal (arm64) but does not contain the x86_64 architecture: /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsCore.framework/GoogleMapsCore

Ignoring file /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsBase.framework/GoogleMapsBase, file is universal (arm64) but does not contain the x86_64 architecture: /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMapsBase.framework/GoogleMapsBase

Ignoring file /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMaps.framework/GoogleMaps, file is universal (arm64) but does not contain the x86_64 architecture: /Users/f4mdev/AndroidStudioProjects/fabTraceability/iosApp/iosApp/GoogleMaps.framework/GoogleMaps

Undefined symbol: _OBJC_CLASS_$_GMSCameraPosition

Undefined symbol: _OBJC_CLASS_$_GMSMapView

Undefined symbol: _OBJC_CLASS_$_GMSServices

This is my Code I tried:

import UIKit 
import GoogleMaps
import SwiftUI
struct GoogleMapsView: UIViewRepresentable {
   private let zoom: Float = 15.0
   func makeUIView(context: Self.Context) -> GMSMapView {
      let camera = GMSCameraPosition.camera(withLatitude: -33.86, longitude: 151.20, zoom: 6.0)
      let mapView = GMSMapView.map(withFrame: CGRect.zero, camera: camera)
      return mapView
}

And here are the "OTHER LINKER FLAGS"
Undefined symbol: _OBJC_CLASS_$_GMSCameraPosition

答案1

得分: 0

Google 地图包不支持苹果芯片。在实际设备上运行应用程序或在 Rosetta 中运行 Xcode 应该可以正常工作。

英文:

Google Maps package doesn't support Apple Silicon. Running the app on an actual device or running xcode in rosetta should work.

huangapple
  • 本文由 发表于 2023年2月6日 02:24:18
  • 转载请务必保留本文链接:https://go.coder-hub.com/75354530.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定