Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Compile]: could not find module 'connectivity_plus' for target 'x86_64-apple-macos'; found: arm64-apple-macos #3415

Open
8 tasks done
wenlongwanggithub opened this issue Jan 2, 2025 · 5 comments
Labels
compile Compilation error triage

Comments

@wenlongwanggithub
Copy link

Operating System

macos-apple

Plugin

connectivity_plus

Version

6.1.1

Flutter SDK

3.19.6

Compilation command

flutter run -d macos

Dart Dependencies

connectivity_plus: ^6.1.1

Native dependencies

No response

Compilation Error

flutter run -d macos                      
Launching lib/main.dart on macOS in debug mode...
Running pod install...                                             863ms
--- xcodebuild: WARNING: Using the first of multiple matching destinations:
{ platform:macOS, arch:arm64, id:00006021-001A31443EEBC01E, name:My Mac }
{ platform:macOS, arch:x86_64, id:00006021-001A31443EEBC01E, name:My Mac }
/Users/wangwl/Work/offcn/code/miniclass/flutter_wb_demo/macos/Flutter/GeneratedPluginRegistrant.swift:8:8: error: could not find module 'connectivity_plus' for target 'x86_64-apple-macos'; found: arm64-apple-macos, at: /Users/wangwl/Work/offcn/code/miniclass/flutter_wb_demo/build/macos/Build/Products/Debug/connectivity_plus/connectivity_plus.framework/Modules/connectivity_plus.swiftmodule
import connectivity_plus
       ^
#import "Headers/connectivity_plus-Swift.h"

Flutter Doctor

[✓] Flutter (Channel stable, 3.19.6, on macOS 14.5 23F79 darwin-arm64, locale zh-Hans-CN)
    • Flutter version 3.19.6 on channel stable at /Users/wangwl/fvm/versions/3.19.6
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 54e66469a9 (9 months ago), 2024-04-17 13:08:03 -0700
    • Engine revision c4cd48e186
    • Dart version 3.3.4
    • DevTools version 2.31.1

[!] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
    • Android SDK at /Users/wangwl/Library/Android/sdk
    ✗ cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    ✗ Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/macos#android-setup for more details.

[✓] Xcode - develop for iOS and macOS (Xcode 15.4)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Build 15F31d
    • CocoaPods version 1.13.0

[✓] Chrome - develop for the web
    • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome

[✓] Android Studio (version 2024.2)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart
    • Java version OpenJDK Runtime Environment (build 21.0.3+-79915917-b509.11)

[✓] IntelliJ IDEA Ultimate Edition (version 2024.1.4)
    • IntelliJ at /Applications/IntelliJ IDEA.app
    • Flutter plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/9212-flutter
    • Dart plugin can be installed from:
      🔨 https://plugins.jetbrains.com/plugin/6351-dart

[✓] VS Code (version 1.96.2)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Flutter extension version 3.102.0

[✓] Connected device (2 available)
    • macOS (desktop) • macos  • darwin-arm64   • macOS 14.5 23F79 darwin-arm64
    • Chrome (web)    • chrome • web-javascript • Google Chrome 131.0.6778.205

Checklist before submitting a bug

  • I searched issues in this repository and couldn't find such bug/problem
  • I Google'd a solution and I couldn't find it
  • I searched on StackOverflow for a solution and I couldn't find it
  • I read the README.md file of the plugin
  • I'm using the latest version of the plugin
  • All dependencies are up to date with flutter pub upgrade
  • I did a flutter clean
  • I tried running the example project
@wenlongwanggithub wenlongwanggithub added compile Compilation error triage labels Jan 2, 2025
@miquelbeltran
Copy link
Member

Can you provide more information about which device (Mac computer) are you using to build the app? I guess this is an issue with building on old Intel Macs.

@wenlongwanggithub
Copy link
Author

MacBook Pro 2023
Apple M2 MAX
Sonoma 14.5

I'm surely confused by the error log. It's arch-arm64. I thought this plugin is not supported for arm64.

@miquelbeltran
Copy link
Member

The plugins do not depend on the architecture. Try to clear pub caches and rebuild again. I just built the sample project on my macbook M1 without issues.

@wenlongwanggithub
Copy link
Author

The error message is like below, any ideas?

image

@wenlongwanggithub
Copy link
Author

Also did as the link says, but did not work for me.

https://stackoverflow.com/a/44486792
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compile Compilation error triage
Projects
None yet
Development

No branches or pull requests

2 participants