iOS模拟器:无法硬链接复制.我的文件系统路径错误? [英] iOS simulator: could not hardlink copy. Wrong path in my filesystem?

查看:100
本文介绍了iOS模拟器:无法硬链接复制.我的文件系统路径错误?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Xcode版本6.1(6A1052d)

I am using Xcode Version 6.1 (6A1052d)

我正在尝试在模拟器上启动一个应用程序.

I am trying to launch an app on the simulator.

第一次,它总是可以正常工作.如果我想第二次启动,则出现错误(请参见下面的日志).然后,在iOS模拟器中,我重置内容和设置",然后我可以再次成功启动.

The first time it always works fine. If I want to launch a second time, I have an error (see log below). Then in iOS simulator I "Reset Content and Settings" and I can launch again successfully.

鉴于错误日志,我认为它必须与错误的路径有关.问题是我对Mac文件系统和路径链接感到不满意,因此非常感谢您的帮助.

Given the error log, I think it must have something to do with a wrong path. The problem is I am bad with Mac filesystem and path linking, so your help would be much appreciated.

编辑: 这是info.plist.xml(如果重要的话,由LibGDX生成)

EDIT: Here is the info.plist.xml (generated by LibGDX if it matters)

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>CFBundleDevelopmentRegion</key>
    <string>en</string>
    <key>CFBundleDisplayName</key>
    <string>${app.name}</string>
    <key>CFBundleExecutable</key>
    <string>${app.executable}</string>
    <key>CFBundleIdentifier</key>
    <string>${app.id}</string>
    <key>CFBundleInfoDictionaryVersion</key>
    <string>6.0</string>
    <key>CFBundleName</key>
    <string>${app.name}</string>
    <key>CFBundlePackageType</key>
    <string>APPL</string>
    <key>CFBundleShortVersionString</key>
    <string>${app.version}</string>
    <key>CFBundleSignature</key>
    <string>????</string>
    <key>CFBundleVersion</key>
    <string>${app.build}</string>
    <key>LSRequiresIPhoneOS</key>
    <true/>
    <key>UIViewControllerBasedStatusBarAppearance</key>
    <false/>
    <key>UIStatusBarHidden</key>
    <true/>
    <key>UIDeviceFamily</key>
    <array>
        <integer>1</integer>
        <integer>2</integer>
    </array>
    <key>UIRequiredDeviceCapabilities</key>
    <array>
        <string>armv7</string>
        <string>opengles-2</string>
    </array>
    <key>UISupportedInterfaceOrientations</key>
    <array>
        <!-- <string>UIInterfaceOrientationPortrait</string> -->
        <string>UIInterfaceOrientationLandscapeLeft</string>
        <string>UIInterfaceOrientationLandscapeRight</string>
    </array>
    <key>CFBundleIcons</key>
    <dict>
        <key>CFBundlePrimaryIcon</key>
        <dict>
            <key>CFBundleIconFiles</key>
            <array>
                <string>Icon</string>
                <string>Icon-72</string>
            </array>
        </dict>
    </dict>
</dict>
</plist>

还有我的robovm.xml:

And my robovm.xml:

app.version=1.0
app.id=<my package name>.IOSLauncher
app.mainclass=<my package name>.IOSLauncher
app.executable=IOSLauncher
app.build=1
app.name=<my app name>

由于杰里米(Jeremy)的建议,我试图在虚拟设备文件夹内的system.log中更准确地识别错误.崩溃时,system.log上有很多条目,所以我可能错过了一些东西……无论如何,我发现了这些潜在的错误:

I have tried to identify more precisely the error thanks to the advice of Jeremy, in the system.log inside the folder of my virtual device. The system.log has a lot of entries around the time of the crash, so I might have missed something... Anyway I have found these potentials errors:

Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e3d0000 createDictFromFile: open failed for /Users/<myname>/Library/Developer/CoreSimulator/Devices/D1C6E4CE-ABF3-4621-B811-913F1705CBE0/data/Containers/Bundle/Application/CA2B6D8C-1A62-4DA6-8433-AA4678D009E1/ManifestCache.plist : No such file or directory

Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e4d6000 writeDictToFile: ==== Successfully wrote Manifest cache to /Users/<myname>/Library/Developer/CoreSimulator/Devices/D1C6E4CE-ABF3-4621-B811-913F1705CBE0/data/Library/Caches/com.apple.mobile.installd.staging/temp.gCGKCY/extracted/ManifestCache.plist

Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e3d0000 validate_stream: Got manifest for version "1 1.0", but expected version "1 "

Nov 28 09:03:44 As-MacBook-Pro installd[668]: 0x10e3d0000 hardlink_copy_hierarchy: Failed to open manifest /Users/<myname>/Library/Developer/CoreSimulator/Devices/D1C6E4CE-ABF3-4621-B811-913F1705CBE0/data/Library/Caches/com.apple.mobile.installd.staging/temp.gCGKCY/extracted/com.apple.deltainstallcommands.<my app.id>

来自Eclipse控制台的原始崩溃日志(设备名称文件夹与我在多个虚拟设备上进行的测试不同,但是错误始终相同)

The original crash log from Eclipse console (device name folders are different as I have tested on multiple virtual devices, but the error is always the same)

11/27/14 9:58:17 AM: [ERROR] Session could not be started: 
Error Domain=LaunchServicesError 
Code=0 "Unable to run app in Simulator" UserInfo=0x7fc8eb900d70 
{Error=PackagePatchFailed, ErrorDescription=Could not hardlink copy 
/Users/<myname>/Library/Developer/CoreSimulator/Devices/055A18BC-73B5-4EA6-A872-488FA69F4750/data/Containers/Bundle/Application/CCF8C472-C48F-41D7-8885-E83830256EE3/IOSLauncher.app 
to 
/Users/<myname>/Library/Developer/CoreSimulator/Devices/055A18BC-73B5-4EA6-A872-488FA69F4750/data/Library/Caches/com.apple.mobile.installd.staging/temp.TsGEn1/extracted/Payload/IOSLauncher.app 
with manifest 
/Users/<myname>/Library/Developer/CoreSimulator/Devices/055A18BC-73B5-4EA6-A872-488FA69F4750/data/Library/Caches/com.apple.mobile.installd.staging/temp.TsGEn1/extracted/com.apple.deltainstallcommands.<pathtomyappexec>, 
NSLocalizedFailureReason=An error was encountered while running 
(Domain = LaunchServicesError, Code = 0), 
NSUnderlyingError=0x7fc8ebb1a500 "The operation couldn’t be completed. 
(LaunchServicesError error 0.)", 
NSLocalizedDescription=Unable to run app in Simulator}

推荐答案

这确实是由应用程序的Info.plist文件中某些键的顺序触发的,并且似乎是iOS模拟器installd进程中的错误. installd有时似乎无法读取CFBundleShortVersionStringCFBundleVersion值.我发现,如果RoboVM确保始终先在Info.plist中移动这些值,它将被写出,从而防止了installd中的错误被触发.现在,我们已经在RoboVM中实现了此变通方法(请参见问题#771 ),它将在下一个每晚版本(20150222版本)和下一个版本.

This is indeed triggered by the order of certain keys in your app's Info.plist file and what seems to be a bug in the iOS simulator's installd process. installd sometimes seems to be unable to read the CFBundleShortVersionString and CFBundleVersion values. I've found that if RoboVM makes sure to always move those values first in the Info.plist it writes out we prevent the bug in installd from being triggered. We have now implemented this workaround in RoboVM (see issue #771) and it will be in the next nightly build (the 20150222 build) and in the next release.

几乎可以从 http://download.robovm.org 下载RoboVM的内部版本.要安装Eclipse插件的夜间版本,您应该使用更新站点

Nightly builds of RoboVM can be downloaded from http://download.robovm.org. To install a nightly build of the Eclipse plugin you should use the update site

http://download.robovm.org/nightlies/eclipse/site.xml

每晚,RoboVM Maven和Gradle插件的SNAPSHOT版本都会推送到Maven Central.

Nightly SNAPSHOT builds of the RoboVM Maven and Gradle plugins are pushed to Maven Central.

这篇关于iOS模拟器:无法硬链接复制.我的文件系统路径错误?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆