Xcode 5.1-컴파일 할 아키텍처가 없습니다 (ONLY_ACTIVE_ARCH = YES, 활성 아치 = x86_64, VALID_ARCHS = i386)
Xcode 5.1로 업데이트 한 후 더 이상 64 비트 시뮬레이터 용 프로젝트를 빌드 할 수 없으며이 오류가 발생합니다.
No architectures to compile for (ONLY_ACTIVE_ARCH=YES, active arch=x86_64, VALID_ARCHS=i386).
이것이 내 목표 빌드 설정입니다.
"Build Active Architecture"를 No로 변경하고 "i386"을 "Valid Architectures"에 추가하려고 시도했지만 안타깝게도 작동하지 않았습니다. 제안 해 주셔서 감사합니다!
XCode 5.1로 업그레이드 한 후 동일한 오류 메시지가 나타납니다. CocoaPods를 사용하고 있습니까? 그렇다면 문제를 해결해야합니다.
- Xcode의 왼쪽 분할 창에있는 작업 공간에서 "Pods"프로젝트를 삭제하고 Xcode를 닫으십시오.
- 명령 행에서 "pod install"을 실행하여 "Pods"프로젝트를 다시 작성하십시오.
- Xcode를 다시 열고 "Pods"프로젝트와 자신의 프로젝트의 빌드 설정에서 "Build Active Architecture Only"가 "No"로 설정되어 있는지 확인하십시오.
- 청소하고 건설하십시오.
당신이해야 할 것은 단지를 설정 ONLY_ACTIVE_ARCH
으로 NO
(나를 위해 적어도 작품). 아래는 이에 대한 스크린 샷입니다.
편집하다:
내가 아는 한 ( 뭔가 잘못, 감사가 있다면 그것을 지적 해주십시오 설정 한 경우) ONLY_ACTIVE_ARCH
에 YES
, 그것은 엑스 코드는 (현재 엑스 코드에서 활동의 장치를 의미하는) 활성 아키텍처 구축을 의미합니다. Xcode의 기본 설정은 Debug로 설정 YES
되어 있으므로 Mac에 연결된 특수 장치에만 빌드하려는 경우 다른 아키텍처에 대한 바이너리를 빌드하지 않습니다.
빌드에 실패한 이유는 프로젝트가 연결된 장치의 아키텍처를 지원하지 않기 때문일 수 있습니다. 따라서 최상의 솔루션은 장치에 적합한 아키텍처를 추가하는 것입니다. 아래는 지원하는 아키텍처 및 장치 목록입니다.
- ARMv8 / ARM64 :
iPhone 6
,iPhone 5s
,iPad Air
,Retina iPad Mini
- ARMv7s :
iPhone 5
,iPhone 5c
,iPad 4
- 하는 ARMv7 :
iPhone 3GS
,iPhone 4
,iPhone 4S
,iPod 3G/4G/5G
,iPad
,iPad 2
,iPad 3
,iPad Mini
- ARMv6에 :
iPhone
,iPhone 3G
,iPod 1G/2G
그런데 왜 "는 설정 ONLY_ACTIVE_ARCH
에 NO
" 작품? 장치는 추가 한 모든 아키텍처에 대해 빌드 된 이진 파일을 계속 실행할 수 있지만 (빌드 통과) 일부 성능이 저하됩니다. 이것은 빠른 해결책이지만 최선은 아닙니다.
참고 : 아키텍처를 많이 추가할수록 바이너리가 더 많이 생성됩니다. 따라서 프로젝트에 적합한 아키텍처를 선택하는 것이 좋습니다. ;)
arm64
대상에 추가하십시오 valid architectures
. x86-64
시뮬레이터 유효한 아키텍처에도 아키텍처를 추가하는 것처럼 보입니다 .
당신이 CocoaPods를 사용하는 경우 포드가 빌드 설정 프로젝트 때문에, 가장 가능성있는 문제는 액티브 아키텍처 전용 빌드 로 설정되어 있음 디버그를.
해결책은 간단합니다. 아니오로 변경하십시오 .
마찬가지로 응용 프로그램 프로젝트의 경우 아니요 로 변경 하십시오.
비슷한 문제가있었습니다. 프로젝트 빌드 설정에서 "아키텍처" 를 " $ (ARCHS_STANDARD_32_BIT) " 로 변경하여 해결했습니다 .
애플은 64 비트 아키텍처에서 앱을 빌드 할 것을 권장하므로 표준 아키텍처 (armv7, arm64)-$ (ARCHS_STANDARD) 를 선택해야합니다 . 클릭 : 애플 문서
추가 : 아키텍처 : $ (ARCHS_STANDARD_INCLUDING_64_BIT)
유효한 아키텍처 : arm64 armv7 armv7s
위의 사항에도 불구하고 여전히 문제가 발생하는 경우 실행중인 시뮬레이터도 지원되는지 확인하십시오. arm7 및 arm7s를 지정했지만 64 비트 시뮬레이터에서 앱을 실행하려고했습니다.
"포드 설치"가 실행될 때마다 디버그에 대해서만 only_active_arch를 재설정하지 않도록하려면 다음을 포드 파일에 추가하면됩니다.
# Append to your Podfile
post_install do |installer_representation|
installer_representation.project.targets.each do |target|
target.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
end
유효한 아키텍처에 arm64를 추가하기 만하면됩니다.
내 문제는 Podfile이 있지만 Pods 프로젝트가 OS X를 대상으로한다는 것 platform :ios
입니다. cocoapods 0.35.0.rc2를 사용하고 있습니다.
이 문제를 해결하려면 프로젝트 탐색기에서 포드 프로젝트를 선택하고 포드 대상 노드가 아니라 포드 프로젝트 (PODs PROJECT) 노드가 iOS를 대상으로하고 있는지 확인하십시오. 즉, 아키텍처 빌드 설정은 다음과 같아야합니다.
- 아키텍처 :
$(ARCHS_STANDARD)
- 기본 SDK :
iOS 8.1
- 지원되는 플랫폼 :
iOS
- 유효한 아키텍처 :
$(ARCHS_STANDARD)
또한 모든 아키텍처를 구축하고 싶었으므로 Podfile에 다음을 추가했습니다.
post_install do | installer |
installer.project.build_configurations.each do |config|
config.build_settings['ONLY_ACTIVE_ARCH'] = 'NO'
end
end
I had to add the following i386
and x86_64
to Valid Architectures
. I'm running Xcode 7.2 and targeting iOS 8+. I already had armv7
, armv7s
and arm64
in there and that was working in Xcode 6.4.
I faced the same problem when running my app on iPad using xcode 5.1. It got resolved by removing armv7s from 'valid architectures' and setting the 'build active architectures only' value to No. Both these fields can be found in your app->targets->build settings->architectures.
I arrived at this question due to a problem with command line build for simulator in Xcode 7.2. In case anyone else gets here with the same issue, I will share the solution I found:
Apparently there is a bug in Xcode 7.2 that causes xcodebuild
to fail when trying to build for simulator. The solution is to specify the option "-destination", e.g:
xcodebuild -project TestBuildCmd.xcodeproj -scheme TestBuildCmd -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6' build
Update
The above example command will build a binary including the graphics for iPhone 6 only. If the binary is run on other simulators, the iPhone 6 graphics is scaled to the platform. A better workaround which contains all graphics for all platforms is to specify the parameter PLATFORM_NAME=iphonesimulator
, for example:
xcodebuild -project TestBuildCmd.xcodeproj -scheme TestBuildCmd -sdk iphonesimulator -arch i386 PLATFORM_NAME=iphonesimulator build
Try removing all previous architectures (i.e. remove the ARCHS_STANDARD setting) at the same time as you add i386 to the Architectures. This should change the active architecture to i386. I encountered a similar issue when I tried to build for armv7 by default, but it kept trying to build for arm64. I changed ARCHS_STANDARD to ARCHS_STANDARD_32_BIT, and this changed the active architecture chosen.
In acrhiecture - sometimes to support 6.0 and 7.0 , we exlude arm64
In architectures - > acrchitecture - select standard architecture arm64 armv7 armv7s. Just below in Valid acrchitecture make user arm64 armv7 armv7s is included. This worked for me.
I solved this problem using @Kjuly's answer and the specific line:
"The reason failed to build might be that, the project does not support the architecture of the device you connected."
With Xcode loaded it automatically set my iPad app to iPad Air
This caused the dependancy analysis error.
Changing the device type immediately solved the issue:
I don't know why this works but this is a very quick answer which saved me a lot of fiddling around in the background and instantly got the app working to test. I would never have thought that this could be a thing and something so simple would fix it but in this case it did.
I found that it was necessary to enter the architecture names by hand:
I don't know why this was necessary, i.e. why these values were not inherited from Xcode itself. But as soon as I did this, the problem went away.
In Valid architectures: Select each entry (release, debug) and build and press backspace. It should work
'IT' 카테고리의 다른 글
헤더 X-Powered-By : Express를 제거 할 수 없습니다 : (0) | 2020.05.29 |
---|---|
CFStringRef를 NSString로 변환하는 방법? (0) | 2020.05.29 |
React.js : 한 컴포넌트를 다른 컴포넌트로 랩핑 (0) | 2020.05.29 |
타사 API를 사용하지 않고 C #으로 파일을 어떻게 압축합니까? (0) | 2020.05.29 |
사용자의 터치로 완벽한 원 그리기 (0) | 2020.05.29 |