【问题标题】:Can't run any other flutter app except for one无法运行除一个以外的任何其他颤振应用程序
【发布时间】: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


    【解决方案1】:

    正如错误所暗示的,您应该分别更改 Android 和 iOS 的包名称和 BundleId。你不应该使用默认的。

    您可以找到操作方法here

    【讨论】:

      猜你喜欢
      • 2020-08-19
      • 1970-01-01
      • 2021-04-19
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-06-06
      • 2019-05-07
      • 2021-01-05
      相关资源
      最近更新 更多