question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Unable to compile: Duplicate interface definition for class 'FLAnimatedImageView'

See original GitHub issue

Hi there!

I’m having problems compiling my app after adding react-native-fast-image.

After running react-native link react-native-fast-image, I receive a bunch of duplicate interface definition for class 'FLAnimatedImageView' and property has a previous declaration errors.

Here’s a subset of the errors I receive:

In file included from /Users/manuelthomsen/Coding/experiments/expo/woodn/node_modules/react-native-fast-image/ios/Vendor/SDWebImage/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m:16:
In file included from /Users/manuelthomsen/Coding/experiments/expo/woodn/node_modules/react-native-fast-image/ios/Vendor/SDWebImage/Vendors/FLAnimatedImage/FLAnimatedImage/FLAnimatedImage.h:13:
/Users/manuelthomsen/Coding/experiments/expo/woodn/node_modules/react-native-fast-image/ios/Vendor/SDWebImage/Vendors/FLAnimatedImage/FLAnimatedImage/FLAnimatedImageView.h:22:1: error: duplicate interface definition for class 'FLAnimatedImageView'
@interface FLAnimatedImageView : UIImageView
^
In module 'FLAnimatedImage' imported from /Users/manuelthomsen/Coding/experiments/expo/test/node_modules/react-native-fast-image/ios/Vendor/SDWebImage/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.h:14:
/Users/manuelthomsen/Library/Developer/Xcode/DerivedData/test-ftzdxdyafvkexabeahltbammdnfq/Build/Products/Debug-iphonesimulator/FLAnimatedImage.framework/Headers/FLAnimatedImageView.h:22:12: note: previous definition is here
@interface FLAnimatedImageView : UIImageView
           ^
In file included from /Users/manuelthomsen/Coding/experiments/expo/test/node_modules/react-native-fast-image/ios/Vendor/SDWebImage/SDWebImage/FLAnimatedImage/FLAnimatedImageView+WebCache.m:16:
In file included from /Users/manuelthomsen/Coding/experiments/expo/test/node_modules/react-native-fast-image/ios/Vendor/SDWebImage/Vendors/FLAnimatedImage/FLAnimatedImage/FLAnimatedImage.h:13:
/Users/manuelthomsen/Coding/experiments/expo/test/node_modules/react-native-fast-image/ios/Vendor/SDWebImage/Vendors/FLAnimatedImage/FLAnimatedImage/FLAnimatedImageView.h:26:48: error: property has a previous declaration
@property (nonatomic, strong) FLAnimatedImage *animatedImage;

Any ideas on how to solve this? This is a basic expo app that has just been detached.

Tested on RN v. 46 and 47.

Thank you!

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Reactions:26
  • Comments:46 (5 by maintainers)

github_iconTop GitHub Comments

61reactions
ruipaulocommented, Sep 21, 2017

Product-> Clean and then rm -rf ~/Library/Developer/Xcode/DerivedData/* did the trick for me.

20reactions
MrLohcommented, Dec 26, 2017

@luco did you really try all three things?

  • rm -rf ~/Library/Developer/Xcode/DerivedData/*
  • rm -rf ios/build
  • in xcode <kbd>Cmd</kbd> + <kbd>Shift</kbd> + <kbd>K</kbd>

Did you try building from xcode and command line

@DylanVann is there any chance you could look into fixing this in the code. This is sucha a terrible annoyance for everyone using this library and it happens regularly. I have no idea what has to be setup in xcode to make this disappear, but there must be something, as I haven’t gotten these errors from any other library.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Duplicate interface declaration for class 'Foo'
Suddenly I have the error "Duplicate interface declaration for class 'Foo'". It mentions a header file being duplicated but there's only one copy....
Read more >
Unable to compile: Duplicate interface definition for class ...
Unable to compile : Duplicate interface definition for class 'FLAnimatedImageView' ... Hi there! I'm having problems compiling my app after adding ...
Read more >
Ios/Cocoapods Duplicate Interface Definition For ...
Unable to compile: Duplicate interface definition for class 'FLAnimatedImageView' and property has a previous declaration errors.
Read more >
Duplicate definition error when compiling .intentdefinition
On Xcode 12 I'm getting a bunch of redefinition/duplicate definition errors when compiling my .intentdefinition file. The relevant code is not even my...
Read more >
Not able to build/ run iOS App
Duplicate interface definition for class 'CDVInvokedUrlCommand' Redefinition of 'CDVCommandStatus' Property has a previous declaration and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found