【发布时间】:2020-06-08 03:08:00
【问题描述】:
我从 git 克隆了一个新的 Flutter 项目
当我尝试运行时,我收到以下错误
Error: Could not resolve the package 'application_flutter_todo' in 'package:application_flutter_todo/utils/constants/api.dart'.
../../.pub-cache/git/flutter_maximo_api-35d1fef13c59a0e7fb70a20916adf1f9d26eac02/lib/src/maximo_api.dart:5:8: Error: Not found:
'package:application_flutter_todo/utils/constants/api.dart'
import 'package:application_flutter_todo/utils/constants/api.dart';
^
Unhandled exception:
FileSystemException(uri=org-dartlang-untranslatable-uri:package%3Aapplication_flutter_todo%2Futils%2Fconstants%2Fapi.dart; message=StandardFileSystem only supports file:* and data:*
URIs)
#0 StandardFileSystem.entityForUri (package:front_end/src/api_prototype/standard_file_system.dart:33:7)
#1 asFileUri (package:vm/kernel_front_end.dart:604:37)
<asynchronous suspension>
#2 writeDepfile (package:vm/kernel_front_end.dart:799:21)
<asynchronous suspension>
#3 FrontendCompiler.compile (package:frontend_server/frontend_server.dart:472:15)
<asynchronous suspension>
#4 _FlutterFrontendCompiler.compile (package:flutter_frontend_server/server.dart:38:22)
#5 starter (package:flutter_frontend_server/server.dart:149:27)
#6 main (file:///b/s/w/ir/cache/builder/src/flutter/flutter_frontend_server/bin/starter.dart:8:30)
#7 _startIsolate.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:305:32)
#8 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:174:12)
Target kernel_snapshot failed: Exception: Errors during snapshot creation: null
Failed to build bundle.
Failed to package /Users/Mohammad/Gemba/application_traxxion.
无法为设备构建预编译的应用程序。
您的应用程序似乎仍包含默认签名标识符。 尝试用 Xcode 中的签名 ID 替换 'com.example': 打开 ios/Runner.xcworkspace
请注意,当前项目没有 import 'package:application_flutter_todo' 语句。 该语句属于另一个应用程序,并且不在我正在尝试运行的当前项目中。
我试过了, 1-扑干净 2-更新颤振 3-更新包 4-清洁产品 5-清理项目 6- 从终端运行项目,visual studio code,xcode 三个都给出了相同的结果。
以上方法均无效。
【问题讨论】:
标签: ios macos flutter terminal