xcode Applovin - 架构 armv7 的未定义符号

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/21447703/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-15 04:36:20  来源:igfitidea点击:

Applovin - Undefined symbols for architecture armv7

iosxcodeios6unity3dapplovin

提问by muneikh

I have integrated Applovin in my Unity project. I then exported my project to iOS and tried to build it. I ended up with the following errors.

我已经在我的 Unity 项目中集成了 Applovin。然后我将我的项目导出到 iOS 并尝试构建它。我最终遇到了以下错误。

Ld /Users/macintoshuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejrmcaclygycsecppqwiuptnzhsa/Build/Products/test.app/test normal armv7
    cd /Users/macintoshuser/Documents/Freelance/WorldWarII_iOS
    setenv IPHONEOS_DEPLOYMENT_TARGET 4.3
    setenv PATH "/Applications/Xcode 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode 2.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
    /Applications/Xcode\ 2.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -arch armv7 -isysroot /Applications/Xcode\ 2.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk -L/Users/macintoshuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejrmcaclygycsecppqwiuptnzhsa/Build/Products -L/Users/macintoshuser/Documents/WWII -L/Users/macintoshuser/Documents/WWII/Libraries -F/Users/macintoshuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejrmcaclygycsecppqwiuptnzhsa/Build/Products -filelist /Users/macintoshuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejrmcaclygycsecppqwiuptnzhsa/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/test.LinkFileList -dead_strip -weak_framework CoreMotion -weak-lSystem -stdlib=libstdc++ -fobjc-link-runtime -miphoneos-version-min=4.3 -framework UIKit -framework SystemConfiguration -framework StoreKit -framework MediaPlayer -framework CoreGraphics -framework CoreTelephony -framework AdSupport -framework Foundation -framework OpenGLES -framework QuartzCore -framework OpenAL -liconv.2 -lAppLovinSdk -lChartboost -liPhone-lib -framework AudioToolbox -framework CFNetwork -framework CoreLocation -weak_framework iAd -framework CoreMedia -framework CoreVideo -weak_framework AVFoundation -weak_framework CoreMotion -weak_framework GameKit -Xlinker -dependency_info -Xlinker /Users/macintoshuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejrmcaclygycsecppqwiuptnzhsa/Build/Intermediates/Unity-iPhone.build/Debug-iphoneos/Unity-iPhone.build/Objects-normal/armv7/test_dependency_info.dat -o /Users/macintoshuser/Library/Developer/Xcode/DerivedData/Unity-iPhone-ejrmcaclygycsecppqwiuptnzhsa/Build/Products/test.app/test

Undefined symbols for architecture armv7:
  "__AppLovinSetMaritalStatus", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetLanguage", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetKeywords", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetInterests", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetIncome", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetVerboseLoggingOn", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetGender", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinHasPreloadedInterstitial", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetCountry", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetAdWidth", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetEducation", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetCarrier", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinPutExtra", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinPreloadInterstitial", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinInitializeSdk", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetBirthYear", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinShowAd", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetSdkKey", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinIsInterstitialShowing", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetEthnicity", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinSetAdPosition", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinShowInterstitial", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
  "__AppLovinHideAd", referenced from:
      RegisterMonoModules() in RegisterMonoModules.o
ld: symbol(s) not found for architecture armv7
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I have been trying different solutions to fix my code but none of them seems to help. Any suggestions will be highly appreciated.

我一直在尝试不同的解决方案来修复我的代码,但它们似乎都没有帮助。任何建议将不胜感激。

采纳答案by muneikh

I just changed the existing architectures to armv6 only and it worked. The Applovin Unity Plugin has old library and only supports armv6 architecture.

我只是将现有架构更改为仅 armv6 并且它有效。Applovin Unity Plugin 库比较老,只支持 armv6 架构。

回答by Prashant

you can change architecture to arm6 or you have to check whether unity support arm7 from project build settings.

您可以将架构更改为 arm6,或者您必须从项目构建设置中检查 unity 是否支持 arm7。

回答by shoan

I faced this problem when I dragged and dropped the files in Xcode from Finder. Instead when I do two fingers click and "Add files to 'Project_Name'", it worked.

当我从 Finder 中拖放 Xcode 中的文件时,我遇到了这个问题。相反,当我用两个手指单击并“将文件添加到'Project_Name'”时,它起作用了。

回答by Matias Gil

Sometimes that happens when you add plugins or extensions to your project that need a framwork from ios, check if it does, and once you deploy your project to xcode check add the framework before compiling.

有时,当您向需要 ios 框架的项目添加插件或扩展时,会发生这种情况,检查它是否存在,一旦将项目部署到 xcode,请检查在编译之前添加框架。