我的 Flutter 项目无法在 ios 模拟器上运行,并抛出此错误:
在 iPhone X 上启动 lib/main.dart?在调试模式...
运行 Xcode 构建...
Xcode 构建完成。7.6s
无法构建 iOS 应用程序
Xcode 构建的错误输出:
?
** 构建失败 **
Xcode 的输出:
?
=== 使用配置调试构建项目运行程序的目标运行程序 ===
/bin/sh: /Users/pinercode/AndroidStudioProjects/bmi-calculator-flutter/packages/flutter_tools/bin/xcode_backend.sh: 没有那个文件或目录
无法为模拟器构建应用程序。
在 iPhone X 上启动应用程序时出错?。
xcode错误也如下:
/bin/sh: /Users/pinercode/AndroidStudioProjects/bmi-calculator-flutter/packages/flutter_tools/bin/xcode_backend.sh: 没有那个文件或目录
我已经尝试过运行 flutter doctor 并且没有错误。我还尝试在构建设置中重新设置我的 xcode 'FLUTTER_ROOT' 和 'FLUTTER_APPLICATION_PATH',但没有成功。
我有一个 flutter 应用程序,我已成功登录用户并且没有出现任何错误。但是,当我在其中一个按钮中尝试 FirebaseAuth.instance.signOut() 时,它会将用户注销,但会引发此错误。我在下面附加了我的云 Firestore 规则。
rules_version = '2';
service cloud.firestore {
match /databases/{database}/documents {
match /merchants/{document=**} {
allow read;
}
match /all_merchants/{document=**} {
allow read;
}
match /Types/{document=**} {
allow read;
}
match /Promotions/{document=**} {
allow read;
}
match /search_types/{document=**} {
allow read;
}
match /users/{userId} {
allow read, update, delete: if request.auth.uid == userId;
allow create: if request.auth.uid != null;
match /{document=**}{
allow read, update, create, delete: if request.auth.uid == userId;
}
}
match /users/{email} {
allow …Run Code Online (Sandbox Code Playgroud) dart firebase firebase-authentication flutter google-cloud-firestore
自从 Flutter 弃用 FlatButton 以来,当用户按下按钮时,我无法再使用splashColor 和highlightColor 属性来设置按钮的颜色。现在我必须使用新按钮之一,例如下面的 TextButton,但我还没有找到任何具有以下功能的按钮样式:当用户按下按钮时,背景颜色不会产生波纹效果。
TextButton(
style: ButtonStyle(
overlayColor: MaterialStateProperty.all(Colors.grey[100]),
),
),
Run Code Online (Sandbox Code Playgroud)