upgrade-support icon indicating copy to clipboard operation
upgrade-support copied to clipboard

0.62 Build error: 'ld: library not found for -lPods-[AppName]-AppNameTests'

Open ccfz opened this issue 4 years ago • 1 comments

Environment

    OS: macOS 10.15.4
    CPU: (8) x64 Intel(R) Core(TM) i5-8259U CPU @ 2.30GHz
    Memory: 355.68 MB / 16.00 GB
    Shell: 5.7.1 - /bin/zsh
  Binaries:
    Node: 13.11.0 - /var/folders/vs/2mgym3v938b0tdl4jj7dkw900000gn/T/yarn--1585892597011-0.5218117306373009/node
    Yarn: 1.22.4 - /var/folders/vs/2mgym3v938b0tdl4jj7dkw900000gn/T/yarn--1585892597011-0.5218117306373009/yarn
    npm: 6.13.7 - /usr/local/bin/npm
    Watchman: 4.9.0 - /usr/local/bin/watchman
  Managers:
    CocoaPods: 1.6.1 - /Users/caspar/.rvm/gems/ruby-2.6.6/bin/pod
  SDKs:
    iOS SDK:
      Platforms: iOS 13.4, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2
    Android SDK:
      API Levels: 28, 29
      Build Tools: 28.0.3, 29.0.0, 29.0.1
      System Images: android-28 | Google Play Intel x86 Atom, android-29 | Intel x86 Atom_64
      Android NDK: Not Found
  IDEs:
    Android Studio: 3.6 AI-192.7142.36.36.6241897
    Xcode: 11.4/11E146 - /usr/bin/xcodebuild
  Languages:
    Python: 2.7.16 - /usr/bin/python
  npmPackages:
    @react-native-community/cli: Not Found
    react: 16.13.0 => 16.13.0 
    react-native: 0.62.0 => 0.62.0 

Upgrading version

0.62

Problem

Build error: 'ld: library not found for -lPods-[AppName]-AppNameTests'

Solution

Not entirely sure what the root cause for this error is but this bug is a result of an obsolete framework file. My guess, this is related to switching the target: [App]Test in the Podfile from inherit! :search_pathsto inherit! :complete.

To solve this error:

  1. Open your project in XCode
  2. Open the Framework directory
  3. Delete the obsolete framework file that causes the error, should be equal to the file name referenced in the error message.
  4. Clean build.
Screenshot 2020-04-03 at 07 15 55

ccfz avatar Apr 03 '20 05:04 ccfz

Still facing this issue , in my case libPods-[AppName].a is also being shown as obsolete

devanshsadhotra25 avatar Mar 14 '22 11:03 devanshsadhotra25