尝试在 iOS 12 及更低版本上启动 Xamarin.iOS 应用程序时出现以下错误(iOS 13 及更高版本确实可以毫无问题地启动应用程序):
调试输出:
error HE0042: Could not launch the app 'com.companyname.App1' on the device 'iOS 12.2 (16E226) - iPhone 8 Plus': The request to open "com.companyname.App1" failed.
Run Code Online (Sandbox Code Playgroud)
模拟器系统.日志
com.apple.CoreSimulator.SimDevice.B80099F4-F084-4872-A08A-87BD762045BF[2469] (UIKitApplication:com.companyname.App1[0x3536][2491][3415]): removing service since it exited with consistent failure - OS_REASON_EXEC
Run Code Online (Sandbox Code Playgroud)
此错误甚至发生在使用 VS for Mac 或 Rider 新生成的应用程序上。
我尝试过但没有任何结果的事情:
删除模拟器中的所有内容和设置(https://forums.xamarin.com/discussion/65978/debugger-wont-start-app-on-ios-device)
重新安装 CoreSimulator(Xamarin.iOS:Visual Studio 2019 更新后无法运行)
清理项目,删除 bin 和 obj 文件夹并重建项目
有没有人遇到过同样的问题,你是如何解决的?
谢谢!
我正在尝试构建一个项目,但是当我输入时:cordova build android出现以下错误:
Generating config.xml from defaults
for platform "android"
Preparing android project
Compiling app on platform "android"
via command "../platforms/android/cordova/build"
Error: An error occurred
while building the android project.Error executing "ant debug -f "../platforms/android/build.xml"":BUILD FAILED /usr/local/Cellar/android-sdk/22.3/tools/ant/build.xml:932:The following error occurred
while executing this line: /usr/local/Cellar/android-sdk/22.3/tools/ant/build.xml:950:null returned: 1
Total time: 18 seconds
at ChildProcess. < anonymous > (/usr/local/lib/node_modules/cordova/src/compile.js:65:22)
at ChildProcess.EventEmitter.emit(events.js: 98: 17)
at maybeClose(child_process.js: 735: 16)
at Socket. < anonymous > (child_process.js: 948: 11)
at Socket.EventEmitter.emit(events.js: 95: 17)
at …Run Code Online (Sandbox Code Playgroud) 我正试图制作一个双倍的格式00,00
例
9,21341> 09,21
10,4312> 10,43
1,01233> 01,01
42,543> 42,54
目前我正在使用String.Format来舍入double
String.format("%s %02.2f - ", example.getName(), example.getDouble());
Run Code Online (Sandbox Code Playgroud)
如果它小于10,则不会在double前面添加额外的零.