- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我想给一些 friend 一个我的项目的apk版本来测试它。
在我的 IDE 上,我的项目运行良好 ,可能是一些错误,但主要概念是可行的。
他们报告了一些在我这边没有发生的错误,所以我尝试了 发布apk 当我触发 一些具体方法出现此错误:
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)] Unhandled Exception: Attempt to execute code removed by Dart AOT
compiler (TFA)
Future askFriends(String friendName) async {
print("Send FRIENDS Request");
print(friendName);
await _fs
.collection("Users")
.document(await pbd.getEmail(friendName))
.collection("FriendsRequest")
.document(await pbd.getUserName())
.setData({
"profilPicture": await pbd.getProfilePicture(),
"friendName": await pbd.getUserName(),
"friendEmail": currentUserEmail,
});
}
void acceptFriends(String friendName, String profilPicture) async {
var reference = randomAlphaNumeric(20);
String friendEmail = await pbd.getEmail(friendName);
String userName = await pbd.getUserName();
print("ADD FRIENDS");
await _fs
.collection("Users")
.document(currentUserEmail)
.collection("FriendsRequest")
.document(friendName)
.delete();
await _fs
.collection("Users")
.document(friendEmail)
.collection("Friends")
.document(userName)
.setData({
"profilPicture": await pbd.getProfilePicture(),
"friendName": userName,
"friendEmail": currentUserEmail,
"chatReference": reference,
});
await _fs
.collection("Users")
.document(currentUserEmail)
.collection("Friends")
.document(friendName)
.setData({
"profilPicture": profilPicture,
"friendName": friendName,
"friendEmail": friendEmail,
"chatReference": reference,
});
_fs.collection("PrivateChat").document(reference).setData({
"users": [userName, friendName]
});
_fs.collection("Users").document(currentUserEmail).updateData({
"friends": await pbd.getUserFriendsNumber(currentUserEmail) + 1,
});
_fs.collection("Users").document(friendEmail).updateData({
"friends": await pbd.getUserFriendsNumber(friendEmail) + 1,
});
}
c:\src\flutter\bin\cache\artifacts\engine\common\flutter_patched_sdk_product/ --target=flutter -Ddart.developer.causal_async_stacks=true
-Ddart.vm.profile=false -Ddart.vm.product=true --bytecode-options=source-positions --aot --tfa --packages D:\Willy\myApp\Komeet\.packages
--output-dill D:\Willy\myApp\Komeet\.dart_tool\flutter_build\605851d98f347f3bc8bcbe0b131320ff\app.dill --depfile
D:\Willy\myApp\Komeet\.dart_tool\flutter_build\605851d98f347f3bc8bcbe0b131320ff\kernel_snapshot.d package:Komeet/main.dart
[+15101 ms] [+15122 ms] kernel_snapshot: Complete
[ +198 ms] [ +266 ms] invalidated build due to missing files:
c:\src\flutter\bin\cache\artifacts\engine\android-arm64-release\windows-x64\gen_snapshot
[ +600 ms] [ +509 ms] android_aot_release_android-arm64: Starting due to {InvalidatedReason.inputChanged, InvalidatedReason.inputMissing}
[ +1 ms] [ +6 ms] executing: c:\src\flutter\bin\cache\artifacts\engine\android-arm64-release\windows-x64\gen_snapshot
--causal_async_stacks --deterministic --snapshot_kind=app-aot-elf
--elf=D:\Willy\myApp\Komeet\.dart_tool\flutter_build\605851d98f347f3bc8bcbe0b131320ff\arm64-v8a\app.so --strip
D:\Willy\myApp\Komeet\.dart_tool\flutter_build\605851d98f347f3bc8bcbe0b131320ff\app.dill
[ +1 ms] [ ] aot_android_asset_bundle: Starting due to {InvalidatedReason.inputChanged}
[ +197 ms] [ +231 ms] aot_android_asset_bundle: Complete
[+10601 ms] [+10568 ms] android_aot_release_android-arm64: Complete
[ +198 ms] [ +245 ms] android_aot_bundle_release_android-arm64: Starting due to {InvalidatedReason.inputChanged}
[ +101 ms] [ +59 ms] android_aot_bundle_release_android-arm64: Complete
[ ] [ +82 ms] Persisting file store
[ +99 ms] [ +65 ms] Done persisting file store
[ +1 ms] [ +3 ms] build succeeded.
Failed to remove build. A program may still be using a file in the directory or the directory itself. To find and stop such a program, see:
https://superuser.com/questions/1333118/cant-delete-empty-folder-because-it-is-used
最佳答案
好的,所以我通过以下方式解决了这个问题:
- 将 flutter channel 更改为稳定
-更改内部版本号
-更改具体方法:
似乎( cloud firestore 有一些问题 (与 IDE 上的项目没有提供相同的结果)。
引用:https://github.com/FirebaseExtended/flutterfire/issues/1857
之前的方法:
Future askFriends(String friendName) async {
print("Send FRIENDS Request");
print(friendName);
await _fs
.collection("Users")
.document(await pbd.getEmail(friendName))
.collection("FriendsRequest")
.document(await pbd.getUserName())
.setData({
"profilPicture": await pbd.getProfilePicture(),
"friendName": await pbd.getUserName(),
"friendEmail": currentUserEmail,
});
}
void acceptFriends(String friendName, String profilPicture) async {
var reference = randomAlphaNumeric(20);
String friendEmail = await pbd.getEmail(friendName);
String userName = await pbd.getUserName();
print("ADD FRIENDS");
await _fs
.collection("Users")
.document(currentUserEmail)
.collection("FriendsRequest")
.document(friendName)
.delete();
await _fs
.collection("Users")
.document(friendEmail)
.collection("Friends")
.document(userName)
.setData({
"profilPicture": await pbd.getProfilePicture(),
"friendName": userName,
"friendEmail": currentUserEmail,
"chatReference": reference,
});
await _fs
.collection("Users")
.document(currentUserEmail)
.collection("Friends")
.document(friendName)
.setData({
"profilPicture": profilPicture,
"friendName": friendName,
"friendEmail": friendEmail,
"chatReference": reference,
});
_fs.collection("PrivateChat").document(reference).setData({
"users": [userName, friendName]
});
_fs.collection("Users").document(currentUserEmail).updateData({
"friends": await pbd.getUserFriendsNumber(currentUserEmail) + 1,
});
_fs.collection("Users").document(friendEmail).updateData({
"friends": await pbd.getUserFriendsNumber(friendEmail) + 1,
});
}
Future askFriends(String friendName) async {
print("Send FRIENDS Request");
String userName = await pbd.getUserName();
String friendEmail = await pbd.getEmail(friendName);
String profilPicture = await pbd.getProfilePicture();
print(friendName);
await _fs
.collection("Users")
.document(friendEmail)
.collection("FriendsRequest")
.document(userName)
.setData({
"profilPicture": profilPicture,
"friendName": userName,
"friendEmail": currentUserEmail,
});
}
void acceptFriends(String friendName, String profilPicture) async {
var reference = randomAlphaNumeric(20);
String friendEmail = await pbd.getEmail(friendName);
String userName = await pbd.getUserName();
String userProfilPicture = await pbd.getProfilePicture();
int userFriends = await pbd.getUserFriendsNumber(currentUserEmail);
int friendFriends = await pbd.getUserFriendsNumber(friendEmail);
print("ADD FRIENDS");
await _fs
.collection("Users")
.document(currentUserEmail)
.collection("FriendsRequest")
.document(friendName)
.delete();
await _fs
.collection("Users")
.document(friendEmail)
.collection("Friends")
.document(userName)
.setData({
"profilPicture": userProfilPicture,
"friendName": userName,
"friendEmail": currentUserEmail,
"chatReference": reference,
});
await _fs
.collection("Users")
.document(currentUserEmail)
.collection("Friends")
.document(friendName)
.setData({
"profilPicture": profilPicture,
"friendName": friendName,
"friendEmail": friendEmail,
"chatReference": reference,
});
_fs.collection("PrivateChat").document(reference).setData({
"users": [userName, friendName]
});
_fs.collection("Users").document(currentUserEmail).updateData({
"friends": userFriends + 1,
});
_fs.collection("Users").document(friendEmail).updateData({
"friends": friendFriends + 1,
});
}
关于android - 当使用发布 apk 时,某些代码已被 Dart AOT 编译器 (TFA) 删除,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59909354/
我正在尝试从 Unity 发布到我的 iPhone 4s。构建成功,但我继续收到此消息: “在 aot-only 模式下运行时无法加载 AOT 模块‘Assembly-CSharp’,因为依赖项无法找
在听说了这么多有关 Angular AOT 模式的信息后,我想尝试一下。因此,我们将应用程序迁移到 Angular v4.1.2,并进行了所有必要的更改。当我尝试使用我的 webpack 配置文件中的
我有一个 C# 项目,我需要将其编译为 native 二进制文件。我在这里读过: http://www.mono-project.com/AOT Mono 可以将程序集预编译为两个选项之一: --ao
我搜索了很多关于这种伟大语言的信息,并在此页面上找到了自己 https://github.com/dart-lang/sdk/wiki/Snapshots但它没有回答一些问题: 快照和 AOT 有什么
我知道什么是字节码检测。它只是在运行时更改 .class 文件字节码,这似乎从 JDK 1.5 开始可用。但是,据说是在类加载期间而不是运行时。 现在我的问题是,什么是 AOT 或提前检测?相反的程序
我正在为我的应用程序构建一个插件系统。我读到任何人都可以反编译 .class 文件,因此我不得不使用 Ahead-Of-Time 编译器(对吗?)。问题是我需要动态加载一些插件类。现在,我正在将所有
我的问题是 Angular 模块之一无法在 Safari 浏览器中正常工作。 我有以下代码: @NgModule({ bootstrap: [ AppComponent ], impo
我在这里问是因为我无法在网上找到完整的文档。示例 here太简单了。我有一个包含多个组件和一些模块的应用程序。用ngc编译后,我有很多错误。我发现修复它们的方法是使用相对路径。因此,我在所有组件中都使
在使用 webpack 进行 AOT 构建后,bundle 将每个组件模板包含两次,使得 bundle 比需要的大得多,因为模板作为字符串包含在内,UglifyJS 无法缩小。 我希望组件模板被排除为
我正在尝试使用 ngc 编译 angular 2.4.4: Error: Error encountered resolving symbol values statically. Expressio
当我这样做时,有什么原因(我可以解决): ngc -p tsconfig.aot.json 作为回应,它要求: 姓名: ngc 似乎忽略了我的 tsconfig.aot.json。 这可能是什么原因?
我正在开发一个 Angular 7 应用程序,除了加载问题外它工作正常,在研究中我发现我应该使用 AOT 构建而不是 JIT 或正常构建,由于应用程序规模巨大,我无法进行 aot 构建,它正在返回堆我
我在 Dynamics AX 2012 中有一个 AOT 查询,它由 HcmWorker 和 HcmEmployment 表(等等)组成。我的问题是,当我创建报告(不是 SSRS)或以其他方式使用此查
有谁知道在使用带有 AOT 编译的 Angular CLI 时如何获得更详细的错误堆栈跟踪?使用 JIT 编译运行时,我的应用程序没有问题,但是当我运行 ng build --aot 时,我得到的只是
我想查询 AOT 以查看是否存在使用 X++ 的表名。谁能指出我正确的方向或提供一些示例代码来做到这一点? 如果表存在并提供名称 (str tableName),则返回 true;否则,返回false
我有一个 Angular 5 应用程序,当我在测试模式下运行时没有问题,也就是说,当我使用 ng serve 命令在本地运行应用程序时。但是,当我在生产模式下部署应用程序时,即通过命令ng build
语境 我正在创建一个 Angular 应用程序的桌面版本,为此我正在使用 Electron 。 打开主窗口非常简单: win = new BrowserWindow({ width: 1280
我有一个看起来像这样的错误处理程序: @Injectable() export class GlobalErrorHandler implements ErrorHandler { construct
当我尝试构建启用了 AOT 选项的 Android 应用程序时,收到以下错误消息。 Invalid command line switch for "aapt.exe". VersionCode is
我在我的 Angular 2 应用程序中使用 Highcharts 和 Kendo Charts,当我尝试运行 AOT 编译时,它会抛出类似的错误 Cannot Import Module 或 Hom
我是一名优秀的程序员,十分优秀!