Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot build on React Native 0.41.2 #59

Closed
philographer opened this issue Feb 13, 2017 · 34 comments
Closed

Cannot build on React Native 0.41.2 #59

philographer opened this issue Feb 13, 2017 · 34 comments

Comments

@philographer
Copy link

philographer commented Feb 13, 2017

Current behavior:

Cannot build.

Reproduce:

$ React native awesome
$ cd awesome
$ npm i --save lottie-react-native

└─┬ lottie-react-native@1.0.6 
  ├── lottie-ios@1.0.2 
  └─┬ react-native-safe-module@1.1.0 
    └── dedent@0.6.0 

$ react-native link lottie-ios

rnpm-install info Linking lottie-ios ios dependency 
rnpm-install info iOS module lottie-ios has been successfully linked 

$ react-native link lottie-react-native/

rnpm-install info Linking lottie-react-native/ android dependency 
rnpm-install info Android module lottie-react-native/ has been successfully linked 
rnpm-install info Linking lottie-react-native/ ios dependency 
rnpm-install info iOS module lottie-react-native/ has been successfully linked 

$ react-native run-ios

ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimatableLayer.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTEllipseShapeLayer.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTGroupLayerView.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTLayerView.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTMaskLayer.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTRectShapeLayer.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeLayerView.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimatableBoundsValue.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimatableColorValue.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimatableNumberValue.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimatablePointValue.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimatableScaleValue.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimatableShapeValue.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeRectangle.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimationCache.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTComposition.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeGroup.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTMask.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeStroke.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTLayer.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimationView.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapePath.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeTransform.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeFill.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeTrimPath.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTShapeCircle.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(CAAnimationGroup+LOTAnimatableGroup.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(CGGeometryAdditions.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(UIColor+Expanded.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(LOTAnimationTransitionController.o)) was built for newer iOS version (10.2) than being linked (8.0)
ld: warning: object file (/Users/yuhogyun/test/awesome/ios/build/Build/Products/Debug-iphonesimulator/libLottie.a(Lottie_vers.o)) was built for newer iOS version (10.2) than being linked (8.0)
Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_LOTStrokeShapeLayer", referenced from:
      _OBJC_CLASS_$_LOTCircleShapeLayer in libLottie.a(LOTEllipseShapeLayer.o)
      _OBJC_CLASS_$_LOTRoundRectLayer in libLottie.a(LOTRectShapeLayer.o)
      objc-class-ref in libLottie.a(LOTShapeLayerView.o)
  "_OBJC_METACLASS_$_LOTStrokeShapeLayer", referenced from:
      _OBJC_METACLASS_$_LOTCircleShapeLayer in libLottie.a(LOTEllipseShapeLayer.o)
      _OBJC_METACLASS_$_LOTRoundRectLayer in libLottie.a(LOTRectShapeLayer.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)


** BUILD FAILED **


The following commands produced analyzer issues:
	Analyze Modules/RCTRedBox.m
(1 command with analyzer issues)


The following build commands failed:
	Ld build/Build/Products/Debug-iphonesimulator/awesome.app/awesome normal x86_64
(1 failure)

Installing build/Build/Products/Debug-iphonesimulator/awesome.app
An error was encountered processing the command (domain=NSPOSIXErrorDomain, code=22):
Failed to install the requested application
The bundle identifier of the application could not be determined.
Ensure that the application's Info.plist contains a value for CFBundleIdentifier.
Print: Entry, ":CFBundleIdentifier", Does Not Exist

Command failed: /usr/libexec/PlistBuddy -c Print:CFBundleIdentifier build/Build/Products/Debug-iphonesimulator/awesome.app/Info.plist
Print: Entry, ":CFBundleIdentifier", Does Not Exist

So, I open my iOS project ,clean and then build

But error log here

Undefined symbols for architecture x86_64:
  "_OBJC_CLASS_$_LOTStrokeShapeLayer", referenced from:
      _OBJC_CLASS_$_LOTCircleShapeLayer in libLottie.a(LOTEllipseShapeLayer.o)
      _OBJC_CLASS_$_LOTRoundRectLayer in libLottie.a(LOTRectShapeLayer.o)
      objc-class-ref in libLottie.a(LOTShapeLayerView.o)
  "_OBJC_METACLASS_$_LOTStrokeShapeLayer", referenced from:
      _OBJC_METACLASS_$_LOTCircleShapeLayer in libLottie.a(LOTEllipseShapeLayer.o)
      _OBJC_METACLASS_$_LOTRoundRectLayer in libLottie.a(LOTRectShapeLayer.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

My environment is OS X Elcapitan 10.11

$ node -v

v7.5.0

$ npm -v

4.1.2

$ react-native -v

react-native-cli: 2.0.1
react-native: 0.41.2

Comment

The recent lottie-ios is 1.0.3 but lottie-react-native dependency ios is 1.0.2

Is it related to the version dependency?

Editted

$ react-native upgrade

Then i can use lottie.

but animation not showing without any error.

@FMJaguar
Copy link

FMJaguar commented Feb 15, 2017

Same error here, temporarily fixed by creating a new project using the guide in #31

Sierra 10.12.3
Node v7.5.0
npm 4.1.2
react-native-cli: 2.0.1
react-native: 0.41.2

@jjhesk
Copy link

jjhesk commented Feb 15, 2017

no animation here and I cannot build. #52

@leesolway
Copy link

Same error

@hugohow
Copy link

hugohow commented Feb 15, 2017

Same for me

@jozan
Copy link

jozan commented Feb 15, 2017

I got it working by adding Lottie.framework to Embedded Binaries in XCode.

image

@philographer
Copy link
Author

@jozan Awesome! It works for me

@hugohow
Copy link

hugohow commented Feb 15, 2017

@jozan it workd for me too ;) Thanks !!

@philographer
Copy link
Author

In more detail,
2017-02-16 2 56 55
2017-02-16 2 57 17

@leesolway
Copy link

Worked for me also, thanks.

@philographer
Copy link
Author

It Resolved For me, so closed

@leesolway
Copy link

Its still a bug though and needs to be resolve, doesn't it?

@peixin
Copy link

peixin commented Feb 17, 2017

@yoohoogun114 Same error. and solved by your answer.
But I have new error:

  1. Can not run react-native run-ios to start simulator, build success, run crash.
  2. Launch simulator from Xcode, no error. but not show animation.

Do you have same question?

@leesolway
Copy link

I had the same experience. I can compile, but no animation or image rendering.

@olle-moren
Copy link

I've RN 0.39.2 and been trying all guides here, still having the same error á 'Lottie/Lottie.h' file not found inside node_modules/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.h
Do you guys think it's RN 0.39.2 being the bad guy?

@indivisable
Copy link

@leesolway same here, trying to figure out why rendering is not working (#52)

@philographer
Copy link
Author

It works for me, but looks like not others. so Reopen.

@philographer philographer reopened this Feb 18, 2017
@jozan
Copy link

jozan commented Feb 19, 2017

@olle-moren-schibsted Are you sure you have linked lottie-iosas well?

react-native link lottie-ios

@olle-moren
Copy link

olle-moren commented Feb 20, 2017

@jozan having node version 6.5.0 and RN 0.39.2 doing like this:

npm i --save lottie-react-native
rn@0.0.1
└─┬ lottie-react-native@1.0.6
  ├── lottie-ios@1.0.2
  └─┬ react-native-safe-module@1.1.0
    └── dedent@0.6.0

react-native link lottie-ios
rnpm-install info Linking lottie-ios ios dependency
rnpm-install info iOS module lottie-ios has been successfully linked
react-native link lottie-react-native
rnpm-install info Linking lottie-react-native android dependency
rnpm-install info Android module lottie-react-native has been successfully linked
rnpm-install info Linking lottie-react-native ios dependency
rnpm-install info iOS module lottie-react-native has been successfully linked

xcode

@jozan
Copy link

jozan commented Feb 22, 2017

@olle-moren-schibsted Those are the steps I got it working on RN 0.41.2.

@PanJ
Copy link

PanJ commented Mar 1, 2017

For anyone that is still having problem. Error is something like this

Class LOTStrokeShapeLayer is implemented in both
...
...

This can be fixed by deleting libLottie.a and adding Lottie.framework in the embeded binaries section instead. The final linked libraries should be like this.

image

@g3r4n
Copy link

g3r4n commented Mar 4, 2017

Thanks @PanJ !

@g3r4n g3r4n mentioned this issue Mar 8, 2017
@kyle-ssg
Copy link

kyle-ssg commented Mar 11, 2017

Can this be added to the readme? After react-native link lottie-ios and react-native link lottie-react-native the only step that is required is to add lottie.framework to linked frameworks and libraries.

@g3r4n
Copy link

g3r4n commented Mar 12, 2017

@kyle-ssg see PR #86

@jjhesk
Copy link

jjhesk commented Mar 14, 2017

It is working only if this condition is met and correctly linked:
Embedded binary + Lottie.framework
Link Frameworks and LIbrary + libLottieReactNative.a

works for RN 0.42.+
iOS 10.2+

@leesolway
Copy link

I had both of these, but was still getting a blank image where the animation should have been.

@g3r4n
Copy link

g3r4n commented Mar 15, 2017

@leesolway Can you confirm that LibLottie.a isn't linked ? Can you provide a screenshot of your Embedded binary and Link Frameworks and LIbrary ?

@Kowaio
Copy link

Kowaio commented Mar 16, 2017

Hi guys,

Posting here because I've got a similar problem. I succeeded to make lottie work on my RN project using Lottie 1.0.6 and RN 0.39 on iOS in debug. I removedlibLottie.a as said above from the linked frameworks and libraries and it's building well on the simulator and animations correctly appear.

However, when using fastlane to generate an .ipa to deploy on Testflight for my team, the build is not working and I've got the following message node_modules/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.h:19:9: 'Lottie/Lottie.h' file not found
http://cl.kowaio.me/2w0M2027462S

I don't know why it's doing this in release. Did you encounter this while trying to build on your side?

Thanks again guys

@g3r4n
Copy link

g3r4n commented Mar 16, 2017

@Kowaio seems like you don't have link the Lottie.Framework. Can you provide a screenshot of your Embedded binary and Link Frameworks and LIbrary ?

@Kowaio
Copy link

Kowaio commented Mar 16, 2017

Sure, here it is: http://cl.kowaio.me/3O3Z3E392i2S

@g3r4n
Copy link

g3r4n commented Mar 16, 2017

@Kowaio can't help sorry. Maybe see this comment.
Open a proper issue to get more accurate help.

@leesolway
Copy link

screen shot 2017-03-16 at 12 29 57

@g3r4n

As requested

@lelandrichardson
Copy link
Collaborator

I believe this should now be fixed in lottie-react-native@1.1.1. Please try it out and let me know if you still have trouble. Closing this issue for now. Thanks!

@Kowaio
Copy link

Kowaio commented Mar 31, 2017

Hello @lelandrichardson,

Sorry to come back to you only now. I tested with lottie-react-native@1.1.1 but I've got the same problem while building for release.

Here's a screenshot: http://cl.ly/0s0U1a211f2j

Thanks

@Duckuism
Copy link

@Kowaio same here.

newsum2019 added a commit to newsum2019/lottie-react-native that referenced this issue Oct 6, 2019
alyssaharvey3 added a commit to alyssaharvey3/react-native-lottie that referenced this issue Aug 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests