如何从外部磁盘运行flutter项目?

问题描述 投票:0回答:2

我想从外部磁盘运行 flutter 项目,但到目前为止我无法在 Android 或 IOS 上执行此操作。在IOS模拟器上总是出现这些错误

 Running "flutter pub get" in myapp...
Launching lib/main.dart on iPhone 12 in debug mode...
/Volumes/dwika/myapp/ios/Runner/Info.plist: Property List error: Found non-key inside <dict> at line 37 / JSON error: JSON text did not start with array or object and option to allow fragments not set.
Running pod install...
CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Finding Podfile changes
      A here_sdk
      A shared_preferences
      - Flutter
      - cloud_firestore
      - firebase_analytics
      - firebase_auth
      - firebase_core
      - firebase_storage
      - image_picker

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `cloud_firestore` from `.symlinks/plugins/cloud_firestore/ios`
    cloud_firestore: Using Firebase SDK version '8.6.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_analytics` from `.symlinks/plugins/firebase_analytics/ios`
    firebase_analytics: Using Firebase SDK version '8.6.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_auth` from `.symlinks/plugins/firebase_auth/ios`
    firebase_auth: Using Firebase SDK version '8.6.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_core` from `.symlinks/plugins/firebase_core/ios`
    firebase_core: Using Firebase SDK version '8.6.0' defined in 'firebase_core'
    -> Fetching podspec for `firebase_storage` from `.symlinks/plugins/firebase_storage/ios`
    firebase_storage: Using Firebase SDK version '8.6.0' defined in 'firebase_core'
    -> Fetching podspec for `here_sdk` from `.symlinks/plugins/here_sdk/ios`
    -> Fetching podspec for `image_picker` from `.symlinks/plugins/image_picker/ios`
    -> Fetching podspec for `shared_preferences` from `.symlinks/plugins/shared_preferences/ios`

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: all_pods_versions_0_3_5.txt exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.7.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
      CDN: trunk Relative path: Specs/0/3/5/Firebase/8.6.0/Firebase.podspec.json exists! Returning local because checking is only performed in repo update
    [!] CocoaPods could not find compatible versions for pod "here_sdk":
      In Podfile:
        here_sdk (from `.symlinks/plugins/here_sdk/ios`)

    Specs satisfying the `here_sdk (from `.symlinks/plugins/here_sdk/ios`)` dependency were found, but they required a higher minimum deployment target.

    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:317:in `raise_error_unless_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:299:in `block in unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `tap'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:297:in `unwind_for_conflict'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:682:in `attempt_to_activate'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:254:in `process_topmost_state'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolution.rb:182:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/molinillo-0.8.0/lib/molinillo/resolver.rb:43:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/resolver.rb:94:in `resolve'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1078:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:1076:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:416:in `analyze'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:241:in `block in resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/user_interface.rb:64:in `section'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:240:in `resolve_dependencies'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/installer.rb:161:in `install!'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command/install.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/lib/cocoapods/command.rb:52:in `run'
    /Library/Ruby/Gems/2.6.0/gems/cocoapods-1.11.2/bin/pod:55:in `<top (required)>'
    /usr/local/bin/pod:23:in `load'
    /usr/local/bin/pod:23:in `<main>'

Error running pod install
Error launching application on iPhone 12

如果我将文件夹放入内部笔记本电脑 SSD 中,它就可以正常工作,由于笔记本电脑存储空间不足,我想从外部磁盘运行它,无论如何要这样做吗?或者我只能接受现实,这样的事情是不可能的? PS:我在 Mac OS Big Sur 11.6 上使用 Macbook Air M1 2020 。

flutter flutter-dependencies
2个回答
0
投票

对于那些仍然面临这个问题的人来说,我的问题是我的驱动器名称中的撇号。卡伦的T7盾牌;删除撇号,它可能会起作用。


0
投票

您找到问题的答案了吗?我现在也有同样的问题。只是想为 Android(在 Mac 上)构建我的应用程序,但因为我使用的是外部 SSD,所以它无法构建。如果我切换到内部驱动器,它会正常构建

© www.soinside.com 2019 - 2024. All rights reserved.