草庐IT

run_test

全部标签

iphone - Xcode 4 在目标设备上显示 "finished running <my app>"——没有任何反应

该应用既不能在我的设备上安装也不能运行。所有配置文件都是最新的。我已经尝试删除并重新安装它们。状态栏显示Xcode正在构建我的项目,然后显示正在运行我的项目,然后显示“已完成运行”。在这整个期间,iPod屏幕一直保持黑色。在Organizer中检测到iPod,我没有发现它的配置有任何问题。就在几天前,Xcode3一切都运行良好。它在模拟器上不起作用,但可能需要注意的是,在模拟器中它似乎卡在“附加到”上并且模拟器拒绝启动。 最佳答案 对于那些阅读这篇关于Xcode4.2并试图在早期设备(例如iPhone3G、2G、iPod第一代等)上

ios - 使用 GCC 时为 "Agreeing to the Xcode/iOS license requires admin privileges, please re-run as root via sudo."

在尝试编译我的C程序时,运行以下命令:gccpthread.c-opthread返回:AgreeingtotheXcode/iOSlicenserequiresadminprivileges,pleasere-runasrootviasudo.我的代码无法编译。为什么会发生这种情况,我该如何解决这个问题? 最佳答案 打开Xcode,接受新的用户协议(protocol)。发生这种情况是因为下载了新版本的Xcode,但未接受新协议(protocol)。 关于ios-使用GCC时为"Agree

testing - 在 Flutter 的 pumpAndSettle() 中,如何在不传入 EnginePhase 的情况下指定超时?

pumpAndSettle()documentation说我可以传入一个timeout。我这样做是通过:awaittester.pumpAndSettle(Duration(minutes:11),EnginePhase.sendSemanticsUpdate,Duration(minutes:12),);如何在不指定EnginePhase的情况下传递超时?我只想使用默认的EnginePhase。我试过:awaittester.pumpAndSettle(Duration(minutes:11),Duration(minutes:12),);awaittester.pumpAndSet

flutter - if condition to run Widget at Container flutter

if条件whenpost.text==1我设置了名为exteranews的小部件Widgetexteranews(BuildContextcontext){doublesiz11=15.0*MediaQuery.of(context).size.width/414.0;}如何在容器中使用ifContainer(if(checkothers)child:exteranews(context),),我设置Stringcheckothers=post.text;我读到我必须设置Widget才能使用runexteranews()但是如何使用if条件 最佳答案

unit-testing - 使用相同的参数链接多个调用以返回不同的结果

我正在编写一个包含大量单元测试的Flutter应用程序。我正在使用Mockito模拟我的类(class)。来自Java(Android)世界,我可以在其中使用Mockito链接调用以在后续调用中返回不同的值。我希望这能奏效。import'package:test/test.dart';import'package:mockito/mockito.dart';voidmain(){test("somestringtest",(){StringProviderstrProvider=MockStringProvider();when(strProvider.randomStr()).the

unit-testing - 在 Dart 中测试包含异步函数的函数

我想测试一个调用其他异步函数的函数,但我不知道如何编写它。函数会像这样:function(Xx,Yy){x.doSomethingAsync().then((result){if(result!=null){y.doSomething();}}}我想同时模拟X和Y,运行X,然后验证是否调用了y.doSomething()。但是我不知道如何等待x.doSomethingAsync()完成。我正在考虑在断言之前做一些等待,但它似乎不是可靠的解决方案。有什么帮助吗?:) 最佳答案 您可以在dart中使用async/await。这会大大简化

debugging - flutter : A procedure runs well in debug mode but not after release, 为什么?

我的项目在Debug模式下一切正常,但在发布后,除了一个过程外一切正常。程序如下:FuturedownloadFile()async{Diodio=Dio();vardirectory=awaitgetApplicationDocumentsDirectory();awaitdio.download(bookUrl,"${directory.path}/$className+$bookName.pdf",onReceiveProgress:(rec,total){setState((){downloading=true;percentage=((rec/total)*100).toSt

integration-testing - 用于测试和目录结构的 Flutter 模拟 Firestore 服务

我正在使用Firestore和Redux。因此,我有一个firestore_service.dart文件,它是Firestore的唯一接口(interface),这个文件更新了Redux存储。出于测试目的,我在项目测试文件夹中创建了firestore_service_mock.dart以及一个模拟数据文件。我的问题与用于测试目的的目录结构和导入有关。main.dart是唯一导入firestore_service.dart的文件。如果我在项目测试文件夹中有firestore_service_mock.dart,那么如何将它导入到main.dart中进行集成测试呢?不确定我是否清楚地解释了

ipad - 终端卡住 : Running Flutter App on iPad - Installing and launching. ..

当我尝试在连接到我的Mac的iPad上运行flutter应用程序时,在终端上进度卡在此处:该应用程序在iPad上完全打开并且可以正常运行。但是在终端上,我不能热重载/重启。以前有人遇到过这种情况吗? 最佳答案 这个解决方案对我有用:podreporemovemasterpodsetup 关于ipad-终端卡住:RunningFlutterApponiPad-Installingandlaunching...,我们在StackOverflow上找到一个类似的问题:

flutter - 在设备上卸载应用程序后 flutter run 不起作用

我正在使用vscode构建我的flutter应用程序。但是在我的设备上卸载调试应用程序后,'flutterrun'命令无法正常工作并停止安装状态。请帮我。谢谢。Launchinglib/main.dartonRNEL21indebugmode...Initializinggradle...۱۱٫۷sResolvingdependencies...۱۴٫۹sGradletask'assembleDebug'...Gradletask'assembleDebug'...Done۱۰۱٫۷sBuiltbuild\app\outputs\apk\debug\app-debug.apk.Inst