Skip to content

[google_maps_flutter] iOS - undefined symbols for architecture #31104

Closed

Description

@josh-burton

I've been really struggling to get xcode to a build a project that uses google maps flutter.

I get the following errors:

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)

I'm using a Flutter module embedded within an app. This app already uses Google Maps.

Activity

  1. josh-burton commented on Apr 16, 2019

    @josh-burton
    ContributorAuthor
    [✓] Flutter (Channel unknown, v1.4.20-pre.2, on Mac OS X 10.14.4 18E226, locale en-AU)
        • Flutter version 1.4.20-pre.2 at /Users/athor/dev/flutter
        • Framework revision 175d3a588c (6 hours ago), 2019-04-16 08:54:32 +1200
        • Engine revision 9aa7c9a48e
        • Dart version 2.2.1 (build 2.2.1-dev.4.2 None)
    
    
    [✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
        • Android SDK at /Users/athor/dev/android-sdk
        • Android NDK location not configured (optional; useful for native profiling support)
        • Platform android-28, build-tools 28.0.3
        • ANDROID_HOME = /Users/athor/dev/android-sdk
        • Java binary at: /Users/athor/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/183.5400832/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
        • All Android licenses accepted.
    
    [✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
        • Xcode at /Applications/Xcode-10.1.app/Contents/Developer
        • Xcode 10.1, Build version 10B61
        • ios-deploy 1.9.4
        • CocoaPods version 1.5.0
    
    [!] Android Studio (version 3.3)
        • Android Studio at /Users/athor/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-2/182.5314842/Android Studio.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        • Dart plugin version 182.5124
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1248-b01)
    
    [!] Android Studio (version 3.4)
        • Android Studio at /Users/athor/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-1/183.5400832/Android Studio.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        ✗ Dart plugin not installed; this adds Dart specific functionality.
        • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    
    [!] Android Studio
        • Android Studio at /Users/athor/Library/Application Support/JetBrains/Toolbox/apps/AndroidStudio/ch-0/191.5455988/Android Studio 3.5 Preview.app/Contents
        ✗ Flutter plugin not installed; this adds Flutter specific functionality.
        • Dart plugin version 183.5901
        • Java version OpenJDK Runtime Environment (build 1.8.0_202-release-1483-b01)
    
    [✓] IntelliJ IDEA Ultimate Edition (version 2019.1)
        • IntelliJ at /Users/athor/Applications/JetBrains Toolbox/IntelliJ IDEA Ultimate.app
        • Flutter plugin version 34.0.4
        • Dart plugin version 191.6183.88
    
    [!] VS Code (version 1.29.0)
        • VS Code at /Applications/Visual Studio Code.app/Contents
        ✗ Flutter extension not installed; install from
          https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter
    
    [✓] Connected device (1 available)
        • Android SDK built for x86 • emulator-5556 • android-x86 • Android 9 (API 28) (emulator)
    
  2. josh-burton commented on Apr 16, 2019

    @josh-burton
    ContributorAuthor

    I've done a bit more investigation and narrowed down the issue.

    The issue is not directly with Flutter modules, but with Flutter projects created as objective c projects.

    The error occurs when using google_maps_flutter along with a plugin that uses swift like 'geolocator', in a Flutter project that is objective c based.

    Unfortunately Flutter modules use objective c and there isn't a way to change them to use swift.

  3. added
    p: mapsGoogle Maps plugin
    t: xcode"xcodebuild" on iOS and general Xcode project management
    platform-iosiOS applications specifically
    on Apr 16, 2019
  4. added this to the milestone on Apr 16, 2019
  5. calvinmuller commented on Apr 24, 2019

    @calvinmuller

    You managed to find a solution to this, i'm also struggling with this issue using multi_image_picker and flutter_card_io?

  6. josh-burton commented on Apr 24, 2019

    @josh-burton
    ContributorAuthor

    Unfortunately not.

    Due to time constraints on this project, I had to use another mapping library (flutter_map).

  7. josh-burton commented on Jun 13, 2019

    @josh-burton
    ContributorAuthor

    @jmagman I wonder if you might have any insight into this issue?

  8. jmagman commented on Jun 13, 2019

    @jmagman
    Member

    Are you able to provide a test app or exact reproduction steps that demonstrate the problem?
    For reference, modules not supporting swift is being tracked with #23955.

  9. josh-burton commented on Jun 13, 2019

    @josh-burton
    ContributorAuthor

    Thanks @jmagman. I'll try to come up with a sample project to replicate it as well.

  10. raja-bounce commented on Aug 2, 2019

    @raja-bounce

    any one got solution for this? i am facing this issue even i have tried with some simple single view application with swift. still getting this error

  11. added
    a: existing-appsIntegration with existing apps via the add-to-app flow
    on Aug 7, 2019
  12. 9 remaining items

  13. khal-it commented on Sep 24, 2019

    @khal-it

    s.static_framework = true worked for me

  14. hahazheng commented on May 2, 2020

    @hahazheng

    any one got solution for this? i am facing this issue even i have tried with some simple single view application with swift. still getting this error

  15. hahazheng commented on May 2, 2020

    @hahazheng

    @athomas @raja-bounce Is your problem solved, thank you

  16. raja-bounce commented on May 2, 2020

    @raja-bounce

    @athomas @raja-bounce Is your problem solved, thank you

    Its working now. After keeping static_framework true in podspec, it's working.

  17. athomas commented on May 4, 2020

    @athomas
    Contributor

    I assume the mention in #31104 (comment) was intended for @athornz rather than me.

  18. raja-bounce commented on May 6, 2020

    @raja-bounce

    @athomas @raja-bounce
    Is working now. After leaving static_framework as false in podspec, it will work. But after static_framework remains true, it displays an error? ? ? ?
    image

    @hahazheng in which podspec you have added static_framework = true ?
    it should be in Google_maps_flutter plugin podspec.

  19. hahazheng commented on May 6, 2020

    @hahazheng

    Google_maps_flutter
    My settings
    google_maps_flutter: ^0.5.27+1
    Google_maps_flutter. podspec static_framework = true.
    Is this correct ???

  20. raja-bounce commented on May 6, 2020

    @raja-bounce

    Google_maps_flutter
    My settings
    google_maps_flutter: ^0.5.27+1
    Google_maps_flutter. podspec static_framework = true.
    Is this correct ???

    Yes

  21. raja-bounce commented on May 6, 2020

    @raja-bounce

    @hahazheng what is the error you are getting in iPhone?

  22. hahazheng commented on May 7, 2020

    @hahazheng

    @hahazheng what is the error you are getting in iPhone?

    image

    i use : flutter build ios-framework --cocoapods
    Simulator And Real machine Show error message
    image

    i use : flutter build ios --debug --no-codesign
    Simulator Show error message
    image

    Real machine Show error message
    image

    flutter build ios-framework --cocoapods (Not included x86_64) ???
    flutter build ios --debug --no-codesign (Not included arm64) ???

    What is the difference between them in google_maps_flutter。。。

  23. tiagoantunes commented on Jun 17, 2020

    @tiagoantunes

    Same behaviour, #59683 (Not fixed)

  24. github-actions commented on Aug 14, 2021

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  25. locked as resolved and limited conversation to collaborators on Aug 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    a: existing-appsIntegration with existing apps via the add-to-app flowp: mapsGoogle Maps pluginpackageflutter/packages repository. See also p: labels.platform-iosiOS applications specificallyt: xcode"xcodebuild" on iOS and general Xcode project management

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions