2014-11-08 51 views
0

調試iOS應用程序時出現錯誤,並且整天卡住了。發生架構錯誤的未定義符號

我所做的是:

  1. 通過的CocoaPods安裝OAuth2Client庫。
  2. 創建viewcontroller來顯示谷歌登錄頁面。
  3. 調試時出現以下錯誤。

Undefined symbols for architecture arm64: "_OBJC_CLASS_$_NXOAuth2Request", referenced from: objc-class-ref in GXLoginGoogleViewController.o "_OBJC_CLASS_$_NXOAuth2AccountStore", referenced from: objc-class-ref in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreErrorKey", referenced from: ___54-[GXLoginGoogleViewController setupOAuth2AccountStore]_block_invoke60 in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreAccountsDidChangeNotification", referenced from: -[GXLoginGoogleViewController setupOAuth2AccountStore] in GXLoginGoogleViewController.o "_NXOAuth2AccountStoreDidFailToRequestAccessNotification", referenced from: -[GXLoginGoogleViewController setupOAuth2AccountStore] in GXLoginGoogleViewController.o ld: symbol(s) not found for architecture arm64 clang: error: linker command failed with exit code 1 (use -v to see invocation)

我已經搜查了許多類似的話題,但我還沒能解決。

任何人都可以提出任何方向來解決這個問題?

回答

0

So when I downloaded the project from github,我首先注意到的是,項目設置不起來很直觀:

These Settings Should Be Changed

在目標的架構欄中的「$」應該切換到指定的iOS標準架構:

To iOS standard architectures

而在這一點上,你應該能夠建立並在設備上運行。如果您還想支持模擬器,則需要添加「i386」作爲體系結構。

相關問題