Unable to open executable - xcode

2020-02-11 02:11发布

I'm getting this error...any idea how to solve it?

GenerateDSYMFile /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app.dSYM /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest
    cd /Users/fmota/Documents/Developer/Protobuf/PBTest
    setenv PATH "/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin:/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Developer/usr/bin/dsymutil /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest -o /Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app.dSYM

error: unable to open executable '/Users/fmota/Library/Developer/Xcode/DerivedData/PBTest-gvudadeakgzklbekugyiqyfyprlt/Build/Products/Debug-iphonesimulator/PBTest.app/PBTest'

9条回答
forever°为你锁心
2楼-- · 2020-02-11 02:31

Another thing to check -- if you have "Continue build after errors" set to YES, then a compile error (which you may have missed in the issue pane) can eventually lead to this error. Fix the compile error to resolve it.

查看更多
SAY GOODBYE
3楼-- · 2020-02-11 02:33

I might be a lil' late to this party, but same problem, solved it by going to Product > Scheme > Manage Schemes... Then simply delete current scheme and recreate a new one then try building again.

This is a good way of resetting any compilation settings you might have inadvertently changed.

查看更多
手持菜刀,她持情操
4楼-- · 2020-02-11 02:38

In my case I had accidentally #imported the implementation file of a class instead of the header file (#import "MyClass.m" instead of #import "MyClass.h"). Unfortunately the error message for this innocent mistake is the opposite of helpful.

查看更多
登录 后发表回答