2

今天刚刚使用 v1.30 遇到了这个问题,我不知道还能应用什么。有趣的是,我可以在 iOS 设备上运行调试版本,它可以正确构建和运行,但尝试在模拟器上运行或在 Xcode 中构建项目会产生此错误。

Failed to build iOS app
Error output from Xcode build:
↳
    ** BUILD FAILED **


Xcode's output:
↳
    Writing result bundle at path:
        /var/folders/n8/srtfdgdx4ggdvqjqp9j3ldwh0000gn/T/flutter_tools.hIAEZA/flutter_ios_build_temp_dirw8LQTg/temporary_xcresult_bundle

    ld: framework not found ObjectBox
    clang: error: linker command failed with exit code 1 (use -v to see invocation)
    note: Using new build system
    note: Planning
    note: Build preparation complete
    note: Building targets in dependency order

    Result bundle written to path:
        /var/folders/n8/srtfdgdx4ggdvqjqp9j3ldwh0000gn/T/flutter_tools.hIAEZA/flutter_ios_build_temp_dirw8LQTg/temporary_xcresult_bundle


Error (Xcode): Framework not found ObjectBox

Could not build the application for the simulator.
Error launching application on iPhone 13.

我更新了 podfiles,运行 setup.rb 输出

 ObjectBox Project Setup 

 Looking for project files in the current directory ...
 Found a single project.
 Using "/Users/me/Projects/appName/ios/Runner.xcodeproj"

Target "Runner":

   Skipping target "Runner", build phase "[OBX] Update Sourcery Generated Files" already up to date.

  No changes made to project. 
 ℹ️ If your code generation was not setup properly run with --help to see options

  Please remember to use the .xcworkspace CocoaPods created from now on instead of your project.

颤振医生的输出

[✓] Flutter (Channel master, 2.10.0-1.0.pre.337, on macOS 11.6.1 20G224 darwin-x64, locale en-US)
    • Flutter version 2.10.0-1.0.pre.337 at /Users/me/development/flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 53771aba0c (2 days ago), 2022-01-31 01:15:14 +0530
    • Engine revision fccb9b670d
    • Dart version 2.17.0 (build 2.17.0-67.0.dev)
    • DevTools version 2.10.0-dev.1

[✓] Android toolchain - develop for Android devices (Android SDK version 31.0.0)
    • Android SDK at /Users/me/Library/Android/sdk
    • Platform android-31, build-tools 31.0.0
    • Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
    • Java version OpenJDK Runtime Environment (build 11.0.11+0-b60-7590822)
    • All Android licenses accepted.

[✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • CocoaPods version 1.11.2

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

[✓] Android Studio (version 2021.1)
    • 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 11.0.11+0-b60-7590822)

[✓] Connected device (2 available)
    • iPhone 13 (mobile) • D81593D6-5B4A-422C-87BD-8008E7B0AF65 • ios            • com.apple.CoreSimulator.SimRuntime.iOS-15-2 (simulator)

[✓] HTTP Host Availability
    • All required HTTP hosts are available

• No issues found!

我检查了文件和位置,一切似乎都在那里,只是似乎没有正确链接。任何人都可以有所了解吗?

4

0 回答 0