GithubHelp home page GithubHelp logo

lottie-react-native / lottie-react-native Goto Github PK

View Code? Open in Web Editor NEW
16.5K 233.0 1.8K 406.62 MB

Lottie wrapper for React Native.

Home Page: https://airbnb.io/lottie/#/react-native

License: Apache License 2.0

JavaScript 3.78% Java 3.98% Objective-C 5.69% Ruby 4.10% Swift 8.56% Starlark 0.67% C# 10.69% C++ 16.94% C 0.56% Objective-C++ 3.60% TypeScript 18.96% Kotlin 22.20% HTML 0.28%
bodymovin animations react-native after-effects react

lottie-react-native's Introduction

Lottie React Native

npm Version License

Lottie component for React Native (iOS, Android, and Windows)

Lottie is an ecosystem of libraries for parsing Adobe After Effects animations exported as JSON with bodymovin and rendering them natively!

For the first time, designers can create and ship beautiful animations without an engineer painstakingly recreating it by hand.

Installing

Breaking Changes in v6!

We've made some significant updates in version 6 that may impact your current setup. To get all the details about these changes, check out the migration guide.

Stay informed to ensure a seamless transition to the latest version. Thank you!

iOS and Android

  • Install lottie-react-native (latest):
yarn add lottie-react-native

Go to your ios folder and run:

pod install

Web

  • Install lottie-react-native (latest):
yarn add lottie-react-native
  • Add dependencies for web players:
yarn add @dotlottie/react-player

Windows (React Native >= 0.63)

Install the `lottie-react-native` npm package. (Click to expand)

Add the following to the end of your project file. For C# apps, this should come after any Microsoft.Windows.UI.Xaml.CSharp.targets includes. For C++ apps, it should come after any Microsoft.Cpp.targets includes.

<PropertyGroup Label="LottieReactNativeProps">
    <LottieReactNativeDir>$([MSBuild]::GetDirectoryNameOfFileAbove($(MSBuildThisFileDirectory), 'node_modules\lottie-react-native\package.json'))\node_modules\lottie-react-native</LottieReactNativeDir>
</PropertyGroup>
<ImportGroup Label="LottieReactNativeTargets">
    <Import Project="$(LottieReactNativeDir)\src\windows\cppwinrt\PropertySheets\LottieGen.Auto.targets" />
</ImportGroup>

Add the LottieReactNative.vcxproj file to your Visual Studio solution to ensure it takes part in the build.

For C# apps, you'll need to install the following packages through NuGet:

  • LottieGen.MsBuild
  • Microsoft.UI.Xaml
  • Win2D.uwp
  • Microsoft.Toolkit.Uwp.UI.Lottie
    • This package is used for loading JSON dynamically. If you only need codegen animation, you can set <EnableLottieDynamicSource>false</EnableLottieDynamicSource> in your project file and omit this reference.

For C++ apps, you'll need these NuGet packages:

  • LottieGen.MsBuild
  • Microsoft.UI.Xaml

WinUI 2.6 (Microsoft.UI.Xaml 2.6.0) is required by default. Overriding this requires creating a Directory.Build.props file in your project root with a <WinUIVersion> property.

In your application code where you set up your React Native Windows PackageProviders list, add the LottieReactNative provider:

// C#
PackageProviders.Add(new LottieReactNative.ReactPackageProvider(new AnimatedVisuals.LottieCodegenSourceProvider()));
// C++
#include <winrt/LottieReactNative.h>
#include <winrt/AnimatedVisuals.h>

...

PackageProviders().Append(winrt::LottieReactNative::ReactPackageProvider(winrt::AnimatedVisuals::LottieCodegenSourceProvider()));

Codegen animations are supported by adding LottieAnimation items to your project file. These will be compiled into your application and available at runtime by name. For example:

<!-- .vcxproj or .csproj -->
<ItemGroup>
    <LottieAnimation Include="Assets/Animations/MyAnimation.json" Name="MyAnimation" />
</ItemGroup>
// js
<LottieView source={"MyAnimation"} style={{width: "100%", height: "100%"}} />

Codegen is available to both C# and C++ applications. Dynamic loading of JSON strings at runtime is currently only supported in C# applications.

Privacy (iOS)

Lottie iOS and Lottie React Native do not collect any data. We provide this notice to help you fill out App Privacy Details. Both libraries provide privacy manifests (Lottie iOS's privacy manifest, Lottie React Native's privacy manifest) which can be included in your app and are available as bundle resources within the libraries by default.

Usage

Lottie can be used in a declarative way:

import React from "react";
import LottieView from "lottie-react-native";

export default function Animation() {
  return (
    <LottieView
      source={require("../path/to/animation.json")}
      style={{width: "100%", height: "100%"}}
      autoPlay
      loop
    />
  );
}

Additionally, there is an imperative API which is sometimes simpler.

import React, { useEffect, useRef } from "react";
import LottieView from "lottie-react-native";

export default function AnimationWithImperativeApi() {
  const animationRef = useRef<LottieView>(null);

  useEffect(() => {
    animationRef.current?.play();

    // Or set a specific startFrame and endFrame with:
    animationRef.current?.play(30, 120);
  }, []);

  return (
    <LottieView
      ref={animationRef}
      source={require("../path/to/animation.json")}
      style={{width: "100%", height: "100%"}}
    />
  );
}

Lottie's animation view can be controlled by either React Native Animated or Reanimated API.

import React, { useEffect, useRef, Animated } from "react";
import { Animated, Easing } from "react-native";
import LottieView from "lottie-react-native";

const AnimatedLottieView = Animated.createAnimatedComponent(LottieView);

export default function ControllingAnimationProgress() {
  const animationProgress = useRef(new Animated.Value(0));

  useEffect(() => {
    Animated.timing(animationProgress.current, {
      toValue: 1,
      duration: 5000,
      easing: Easing.linear,
      useNativeDriver: false,
    }).start();
  }, []);

  return (
    <AnimatedLottieView
      source={require("../path/to/animation.json")}
      progress={animationProgress.current}
      style={{width: "100%", height: "100%"}}
    />
  );
}

Changing color of layers:

NOTE: This feature may not work properly on Android. We will try fix it soon.

import React from "react";
import LottieView from "lottie-react-native";

export default function ChangingColorOfLayers() {
  return (
    <LottieView
      source={require("../path/to/animation.json")}
      colorFilters={[
        {
          keypath: "button",
          color: "#F00000",
        },
        {
          keypath: "Sending Loader",
          color: "#F00000",
        },
      ]}
      style={{width: "100%", height: "100%"}}
      autoPlay
      loop
    />
  );
}

If you want to use .lottie files

You need to modify your metro.config.js file accordingly by adding lottie extension to the assetExts array:

const { getDefaultConfig, mergeConfig } = require("@react-native/metro-config");

const defaultConfig = getDefaultConfig(__dirname);

/**
 * Metro configuration
 * https://facebook.github.io/metro/docs/configuration
 *
 * @type {import('metro-config').MetroConfig}
 */
const config = {
  resolver: {
    assetExts: [...defaultConfig.resolver.assetExts, "lottie"],
  },
};

module.exports = mergeConfig(getDefaultConfig(__dirname), config);

Setup jest for dotLottie files

Create a file in the following path __mocks__/lottieMock.js and add the following code:

module.exports = "lottie-test-file-stub";

Then add the following to your jest.config.js file:

module.exports = {
  ...
  moduleNameMapper: {
    ...,
    '\\.(lottie)$': '<rootDir>/jest/__mocks__/lottieMock.js',
  },
  ...
}

API

You can find the full list of props and methods available in our API document. These are the most common ones:

Prop Description Default
source Mandatory - The source of animation. Can be referenced as a local asset by a string, or remotely with an object with a uri property, or it can be an actual JS object of an animation, obtained (for example) with something like require('../path/to/animation.json'). None
style Style attributes for the view, as expected in a standard View. You need to set it manually. Refer to this pull request.
loop A boolean flag indicating whether or not the animation should loop. true
autoPlay A boolean flag indicating whether or not the animation should start automatically when mounted. This only affects the imperative API. false
colorFilters An array of objects denoting layers by KeyPath and a new color filter value (as hex string). []

More...

Troubleshooting

Not all After Effects features are supported by Lottie. If you notice there are some layers or animations missing check this list to ensure they are supported.

More

View more documentation, FAQ, help, examples, and more at airbnb.io/lottie

Example1

Example2

Example3

Community

Example4

lottie-react-native's People

Contributors

aaastorga avatar alexandereggers avatar andresesfm avatar andrewtremblay-pear avatar aschultz avatar catalinvoss avatar dannycochran avatar dependabot[bot] avatar dryganets avatar emilioicai avatar gpeal avatar grifotv avatar hannanabdul55 avatar ifsnow avatar jalpedersen avatar jamieparkinson avatar janicduplessis avatar jhen0409 avatar lelandrichardson avatar lorenc-tomasz avatar mandrigin avatar matinzd avatar minishlink avatar mrgvsv avatar mrousavy avatar oblador avatar radex avatar salvatoret avatar therogue76 avatar yjb94 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

lottie-react-native's Issues

[!] Unable to find a specification for `lottie-ios`

When I want to run sample project (all steps followed) after running nom run build:pods i get following error:

[!] Unable to find a specification for lottie-ios depended upon by lottie-react-native

when can cause this and how to fix it?
I also experienced this when integrating lottie to clean react native project (on pod install).

Build failed with: ':app:dexDebug' task

When i try to build i get this error:

`:app:dexDebug FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 2`

and also :
:app:dexDebug Unknown source file : UNEXPECTED TOP-LEVEL EXCEPTION: Unknown source file : com.android.dex.DexException: Multiple dex files define Landroid/support/v7/appcompat/R$anim; Unknown source file : at com.android.dx.merge.DexMerger.readSortableTypes(DexMerger.java:596) Unknown source file : at com.android.dx.merge.DexMerger.getSortedTypes(DexMerger.java:554) Unknown source file : at com.android.dx.merge.DexMerger.mergeClassDefs(DexMerger.java:535) Unknown source file : at com.android.dx.merge.DexMerger.mergeDexes(DexMerger.java:171) Unknown source file : at com.android.dx.merge.DexMerger.merge(DexMerger.java:189) Unknown source file : at com.android.dx.command.dexer.Main.mergeLibraryDexBuffers(Main.java:502) Unknown source file : at com.android.dx.command.dexer.Main.runMonoDex(Main.java:334) Unknown source file : at com.android.dx.command.dexer.Main.run(Main.java:277) Unknown source file : at com.android.dx.command.dexer.Main.main(Main.java:245) Unknown source file : at com.android.dx.command.Main.main(Main.java:106)

iOS requires cocoapods because of Lottie dependency. Any other option?

Hi, I'm just getting a basic example set up but I can't seem to get a visible animation on screen..

import React from 'react';
import {
  AppRegistry,
  View,
} from 'react-native';
import Animation from 'lottie-react-native';

class LottieExample extends React.Component {
  componentDidMount() {
    this.animation.play();
  }

  render() {
    return (
      <View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
        <View style={{ borderWidth: 1, borderColor: 'black' }}>
          <Animation
            ref={animation => {this.animation = animation}}
            style={{ width: 200, height: 200, }}
            source={require('./animations/HamburgerArrow.json')}
          />
        </View>
      </View>
    );
  }
}

AppRegistry.registerComponent('LottieExample', () => LottieExample);

Any ideas? It's more or less a copy & paste from the README

Example animations not always running on iOS

There seems to be an issue on iOS where the animation won't always start and run properly, it only happens when driving progress with an Animated.value, works fine when using the imperative API.

Repro:
In the lottie example

  • Run the first animation -> works
  • Change example to another one
  • Run the animation -> sometimes doesn't work, if it works keep changing example until it doesn't

iPhone 6 simulator (iOS 10), RN 0.40 (exponent)

Also tested on Android and the bug is not present.

Example project fails to build

Hello,
I'm trying to get started with Lottie on RN.
I started here https://github.com/airbnb/lottie-react-native#running-the-example-project

Everything is good until I get to
npm run run:ios

Encountering build errors similar to (but not the same) as #57.

/Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.m:21:3: error: unknown type name 'LOTAnimationView'; did you mean 'LAAnimationView'?
  LOTAnimationView *_animationView;
  ^~~~~~~~~~~~~~~~
  LAAnimationView
In file included from /Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.m:9:
In file included from /Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.h:19:
In file included from /Users/paws/projects/lottie-react-native/example/ios/Pods/Headers/Public/lottie-ios/Lottie/Lottie.h:13:
/Users/paws/projects/lottie-react-native/example/ios/Pods/Headers/Public/lottie-ios/Lottie/LAAnimationView.h:13:12: note: 'LAAnimationView' declared here
@interface LAAnimationView : UIView
           ^
/Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.m:76:31: error: expected a type
- (void)replaceAnimationView:(LOTAnimationView *)next {
                              ^
/Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.m:54:31: error: unknown receiver 'LOTAnimationView'; did you mean 'LAAnimationView'?
  [self replaceAnimationView:[LOTAnimationView animationFromJSON:json]];
                              ^~~~~~~~~~~~~~~~
                              LAAnimationView
In file included from /Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.m:9:
In file included from /Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.h:19:
In file included from /Users/paws/projects/lottie-react-native/example/ios/Pods/Headers/Public/lottie-ios/Lottie/Lottie.h:13:
/Users/paws/projects/lottie-react-native/example/ios/Pods/Headers/Public/lottie-ios/Lottie/LAAnimationView.h:13:12: note: 'LAAnimationView' declared here
@interface LAAnimationView : UIView
           ^
/Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.m:58:31: error: unknown receiver 'LOTAnimationView'; did you mean 'LAAnimationView'?
  [self replaceAnimationView:[LOTAnimationView animationNamed:name]];
                              ^~~~~~~~~~~~~~~~
                              LAAnimationView
In file included from /Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.m:9:
In file included from /Users/paws/projects/lottie-react-native/lib/ios/LottieReactNative/LRNContainerView.h:19:
In file included from /Users/paws/projects/lottie-react-native/example/ios/Pods/Headers/Public/lottie-ios/Lottie/Lottie.h:13:
/Users/paws/projects/lottie-react-native/example/ios/Pods/Headers/Public/lottie-ios/Lottie/LAAnimationView.h:13:12: note: 'LAAnimationView' declared here
@interface LAAnimationView : UIView
           ^
4 errors generated.

UNMET PEER DEPENDENCY Error

When I run
npm i --save lottie-react-native
I get an error message saying;

โ”œโ”€โ”ฌ [email protected]
โ”‚ โ””โ”€โ”€ UNMET PEER DEPENDENCY react-native@*
โ”œโ”€โ”€ UNMET PEER DEPENDENCY react@>=15.3.1
โ””โ”€โ”€ UNMET PEER DEPENDENCY react-native@>=0.35
npm WARN [email protected] requires a peer of react@>=15.3.1 but none was installed.
npm WARN [email protected] requires a peer of react-native@>=0.35 but none was installed.
npm WARN [email protected] requires a peer of react-native@* but none was installed.

Running the latest version of React Native

Steps for Building without Cocoa Pods

This may be helpful to others as it took me a few tries to get this working when integrating the library into an existing project (RN 0.36.0):

Step 1) Manually add babel-presets to package.json

  "devDependencies": {
    "babel-preset-airbnb": "^1.1.1",
    "babel-plugin-module-resolver": "^2.3.0",

Step 2) Install the React Native wrapper:

yarn add lottie-react-native OR npm -i lottie-react-native --save

Step 3) Install and Link to your project

yarn install OR npm install
react-native link lottie-react-native

Step 4) Clone the lottie-ios (Objective-C) library (pref outside your project path)

git clone https://github.com/airbnb/lottie-ios.git

Step 5) Drag and drop your project into the Libraries Folder (in XCode)

image

Step 6) Add to Embedded Binaries and Linked Frameworks (of main project)

image

Step 7) Clean and Rebuild your project in XCode

Step 8) Start the server and load app

yarn start OR npm start

If get some errors try to flush cache etc.

 watchman watch-del-all
 rm -rf $TMPDIR/react-native-packager-*
 npm start -- --reset-cache

@AlexDM0 @lelandrichardson Thanks for the help ๐Ÿฅ‡

References: #19 #25

Compiles fine but iOS crashes on startup

Runs fine on Android, runs fine on XCode simulator, but crashes instantly on iOS startup, giving me nothing but a stack trace to some assembly line..

I found out through another post that the issue was that I had not added Lottie.framework to "Embedded Frameworks" in the "General" tab.
Hope this helps someone out!

loop animation waits before restarting.

Hi i basically this in my component

    _startAnimation = () => {
        Animated.timing(this.progress, {
          toValue: 1,
          duration: DURATION,
      }).start(() => {
          this.progress.setValue(0);
          this._startAnimation();
      });
    }

    componentDidMount() {
        this._startAnimation();
    }

                    <Animation
                      style={{width: width, height: height, marginBottom: 50}}
                      source={require('../animations/loadingSpinner.json')}
                      progress={this.progress}
                    />

And the animation runs ones then waits and then runs again.
The time it waits gets shorter if the duration is gets shorter.

Here is the animation.

{"assets":[],"layers":[{"ddd":0,"ind":0,"ty":4,"nm":"EV RY Outlines","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[129,167,0]},"a":{"k":[0,0,0]},"s":{"k":[442.04,442.04,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-4.078,0],[-4.078,-1.169],[-17.676,-1.169],[-17.676,-14.204],[-4.944,-14.204],[-4.944,-15.373],[-17.676,-15.373],[-17.676,-28.278],[-4.078,-28.278],[-4.078,-29.447],[-18.975,-29.447],[-18.975,0]],"c":true}},"nm":"E","mn":"ADBE Vector Shape - Group"},{"ty":"fl","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"E","np":3,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[11.052,0],[12.525,0],[23.784,-29.447],[22.311,-29.447],[11.788,-1.689],[1.265,-29.447],[-0.207,-29.447]],"c":true}},"nm":"V","mn":"ADBE Vector Shape - Group"},{"ty":"fl","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"V","np":3,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[-1.646,-8.271],[0,0],[3.334,1.386],[0,4.33],[5.197,0],[0,0]],"o":[[0,0],[0,0],[0,0],[4.071,0],[0,0],[-1.429,-7.665],[3.897,-0.823],[0,-4.85],[0,0],[0,0]],"v":[[-17.964,36],[-16.665,36],[-16.665,22.359],[-12.075,22.359],[-1.465,36],[-0.166,36],[-8.784,22.143],[-1.985,14.478],[-10.776,6.553],[-17.964,6.553]],"c":true}},"nm":"R","mn":"ADBE Vector Shape - Group"},{"ind":1,"ty":"sh","ks":{"k":{"i":[[0,-4.287],[4.201,0],[0,0],[0,0],[0,0]],"o":[[0,4.287],[0,0],[0,0],[0,0],[4.201,0]],"v":[[-3.371,14.521],[-10.776,21.19],[-16.665,21.19],[-16.665,7.722],[-10.776,7.722]],"c":true}},"nm":"R","mn":"ADBE Vector Shape - Group"},{"ty":"mm","mm":1,"nm":"Merge Paths 1","mn":"ADBE Vector Filter - Merge"},{"ty":"fl","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"R","np":5,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[11.367,36],[12.667,36],[12.667,22.662],[22.756,6.553],[21.154,6.553],[12.017,21.276],[2.88,6.553],[1.277,6.553],[11.367,22.662]],"c":true}},"nm":"Y","mn":"ADBE Vector Shape - Group"},{"ty":"fl","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Y","np":3,"mn":"ADBE Vector Group"}],"ip":0,"op":31.031031031031,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":4,"nm":"Box","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[129,181.5,0]},"a":{"k":[0,0,0]},"s":{"k":[105.47,103.278,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[243.398,336.199]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"w":{"k":0},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"fl","fillEnabled":true,"c":{"k":[0,0,0,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[3.262,-2.569],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[101,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"mn":"ADBE Vector Group"}],"ip":0,"op":31.031031031031,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":4,"nm":"Grad 2","ks":{"o":{"k":100},"r":{"k":[{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":0,"s":[0],"e":[91]},{"i":{"x":[0.833],"y":[0.833]},"o":{"x":[0.167],"y":[0.167]},"n":["0p833_0p833_0p167_0p167"],"t":15,"s":[91],"e":[180]},{"t":29}]},"p":{"k":[134,179.5,0]},"a":{"k":[0,0,0]},"s":{"k":[105.201,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ty":"rc","d":1,"s":{"k":[28.062,536.562]},"p":{"k":[0,0]},"r":{"k":0},"nm":"Rectangle Path 1","mn":"ADBE Vector Shape - Rect"},{"ty":"st","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"w":{"k":0},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"fl","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0.305,-0.836],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[456.246,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Rectangle 1","np":3,"mn":"ADBE Vector Group"},{"ty":"fl","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"}],"ip":0,"op":31.031031031031,"st":0,"bm":0,"sr":1}],"v":"4.5.3","ddd":0,"ip":0,"op":30,"fr":30,"w":268,"h":359}

Duplicate module name: react-native-packager

I've attempted to install Lottie via pod install, but when I run the app I get the following error in the packager:

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: react-native-packager
  Paths: /Users/xxxx/MyApp/ios/Pods/React/packager/package.json collides with /Users/xxxx/MyApp/node_modules/react-native/packager/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
  Duplicate module name: react-native-packager
  Paths: /Users/xxxx/MyApp/ios/Pods/React/packager/package.json collides with /Users/xxxx/MyApp/node_modules/react-native/packager/package.json

This error is caused by a @providesModule declaration with the same name across two different files.
    at HasteMap._updateHasteMap (/Users/xxxx/MyApp/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
    at p.getName.then.name (/Users/xxxx/MyApp/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:133:31)

Any thoughts on how to resolve this naming collision?

Unable to build iOS examples

I tried Lottie when it was initially release but figured I'd give it a bit of time to iron out some of the issues that were present at launch. I've made a fresh clone though and I'm still unable to build:

screen shot 2017-02-21 at 14 49 37

I'm using v1.0.6 if that helps, thanks.

Cannot `npm start`

I tried to run npm start but the packager report an error:

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: deprecated
  Paths: /Users/hoangpham/Documents/lottie-react-native/node_modules/react-native/local-cli/server/middleware/heapCapture/bundle.js collides with /Users/hoangpham/Documents/lottie-react-native/node_modules/react-native/Libraries/Renderer/src/shared/utils/deprecated.js

This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
  Duplicate module name: deprecated
  Paths: /Users/hoangpham/Documents/lottie-react-native/node_modules/react-native/local-cli/server/middleware/heapCapture/bundle.js collides with /Users/hoangpham/Documents/lottie-react-native/node_modules/react-native/Libraries/Renderer/src/shared/utils/deprecated.js

This error is caused by a @providesModule declaration with the same name across two different files.
    at HasteMap._updateHasteMap (/Users/hoangpham/Documents/lottie-react-native/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
    at /Users/hoangpham/Documents/lottie-react-native/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:119:31

How to run the example?

Not really know how to run the example. If have a more explicit instruction is better ๐Ÿ˜ฌ

Update header paths for React Native 0.40

It would be great it React file headers paths could be updated to work with RN 0.40

I tried to do it myself but just got a bunch more errors so probably worth someone who actually knows what they're doing taking a look:

screen shot 2017-02-02 at 15 25 34

animations that requires assets

Hi, how does it work with animations that require assets
got an animation that makes use of some png files.

This is our animation.

{"assets":[{"id":"image_0","w":750,"h":1334,"u":"images/","p":"img_0.png"},{"id":"image_1","w":750,"h":1334,"u":"images/","p":"img_1.png"},{"id":"image_2","w":750,"h":1334,"u":"images/","p":"img_2.png"},{"id":"image_3","w":750,"h":1334,"u":"images/","p":"img_3.png"},{"id":"image_4","w":750,"h":1334,"u":"images/","p":"img_4.png"},{"id":"comp_0","layers":[{"ddd":0,"ind":0,"ty":0,"nm":"Create","refId":"comp_1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[375,719,0]},"a":{"k":[375,667,0]},"s":{"k":[100,100,100]}},"ao":0,"w":750,"h":1334,"ip":59.0000024031193,"op":300.00001221925,"st":59.0000024031193,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":0,"nm":"Folding map","refId":"comp_2","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[{"i":{"x":0.667,"y":0.587},"o":{"x":0.333,"y":0},"n":"0p667_0p587_0p333_0","t":25,"s":[375,-433,0],"e":[375,-211.534,0],"to":[0,45.6820678710938,0],"ti":[0,-109.356178283691,0]},{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0.541},"n":"0p667_1_0p333_0p541","t":41,"s":[375,-211.534,0],"e":[375,0,0],"to":[0,63.400260925293,0],"ti":[0,-26.4846038818359,0]},{"t":61.0000024845809}]},"a":{"k":[375,779.5,0]},"s":{"k":[100,100,100]}},"ao":0,"w":750,"h":1559,"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":2,"nm":"Full Map","refId":"image_4","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[375,667,0]},"a":{"k":[375,667,0]},"s":{"k":[100,100,100]}},"ao":0,"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1}]},{"id":"comp_1","layers":[{"ddd":0,"ind":0,"ty":2,"nm":"Left","refId":"image_0","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":10,"s":[375,27,0],"e":[375,667,0],"to":[0,106.666664123535,0],"ti":[0,-106.666664123535,0]},{"t":35.0000014255792}]},"a":{"k":[375,667,0]},"s":{"k":[100,100,100]}},"ao":0,"ip":0,"op":122.000004969162,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":2,"nm":"Middle","refId":"image_1","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":0,"s":[375,27,0],"e":[375,667,0],"to":[0,106.666664123535,0],"ti":[0,-106.666664123535,0]},{"t":24.00000097754}]},"a":{"k":[375,667,0]},"s":{"k":[100,100,100]}},"ao":0,"ip":0,"op":123.000005009893,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":2,"nm":"Right","refId":"image_2","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[{"i":{"x":0.667,"y":1},"o":{"x":0.333,"y":0},"n":"0p667_1_0p333_0","t":8,"s":[375,27,0],"e":[375,667,0],"to":[0,106.666664123535,0],"ti":[0,-106.666664123535,0]},{"t":25.0000010182709}]},"a":{"k":[375,667,0]},"s":{"k":[100,100,100]}},"ao":0,"ip":0,"op":123.000005009893,"st":0,"bm":0,"sr":1}]},{"id":"comp_2","layers":[{"ddd":0,"ind":0,"ty":2,"nm":"Top Map","refId":"image_3","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[375,1887.5,0]},"a":{"k":[375,667,0]},"s":{"k":[100,100,100]}},"ao":0,"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":4,"nm":"Crop","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[375,1879.5,0]},"a":{"k":[0,0,0]},"s":{"k":[100,100,100]}},"ao":0,"shapes":[{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0]],"o":[[0,0]],"v":[[301,-1127]],"c":false}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"w":{"k":0},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"fl","fillEnabled":true,"c":{"k":[0,0,0,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 3","np":3,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"ty":"st","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"w":{"k":0},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"fl","fillEnabled":true,"c":{"k":[0,0,0,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 2","np":2,"mn":"ADBE Vector Group"},{"ty":"gr","it":[{"ind":0,"ty":"sh","ks":{"k":{"i":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"o":[[0,0],[0,0],[0,0],[0,0],[0,0],[0,0]],"v":[[-507,-1735],[-267,-375],[-91,-443],[63,-385],[241,-457],[441,-1751]],"c":true}},"nm":"Path 1","mn":"ADBE Vector Shape - Group"},{"ty":"st","fillEnabled":true,"c":{"k":[1,1,1,1]},"o":{"k":100},"w":{"k":0},"lc":1,"lj":1,"ml":4,"nm":"Stroke 1","mn":"ADBE Vector Graphic - Stroke"},{"ty":"fl","fillEnabled":true,"c":{"k":[0,0,0,1]},"o":{"k":100},"nm":"Fill 1","mn":"ADBE Vector Graphic - Fill"},{"ty":"tr","p":{"k":[0,0],"ix":2},"a":{"k":[0,0],"ix":1},"s":{"k":[100,100],"ix":3},"r":{"k":0,"ix":6},"o":{"k":100,"ix":7},"sk":{"k":0,"ix":4},"sa":{"k":0,"ix":5},"nm":"Transform"}],"nm":"Shape 1","np":3,"mn":"ADBE Vector Group"}],"ip":0,"op":300.00001221925,"st":0,"bm":0,"sr":1}]}],"layers":[{"ddd":0,"ind":0,"ty":0,"nm":"Screen 1","refId":"comp_0","ks":{"o":{"k":100},"r":{"k":0},"p":{"k":[375,515,0]},"a":{"k":[375,667,0]},"s":{"k":[100,100,100]}},"ao":0,"w":750,"h":1334,"ip":0,"op":106.000004317469,"st":-10.0000004073083,"bm":0,"sr":1}],"v":"4.5.3","ddd":0,"ip":0,"op":104.000004236007,"fr":29.9700012207031,"w":750,"h":630}

Our designer then traced the images and made the Json without require and it still did not work so we might be doing something wrong altogether.

Installation Guide

Hey there,

The README is missing a simple installation guide. I'm very interested in using this in the future, but I don't want people to get their hopes up when using something like Exponent thinking that they can use it like any JS library (before they look at the code and see the *.gradle files of course). I'm assuming it's just a simple npm i -S lottie-react-native && react-native link lottie-react-native, but there are often caveats to native modules that could be explained if they exist with this one.

Thanks and great job guys!

RN 0.41 includes a bundle file that causes node haste conflict

Following https://github.com/airbnb/lottie-react-native#running-the-example-project

You can check out the example project with the following instructions

  1. Clone the repo: git clone https://github.com/airbnb/lottie-react-native.git
  2. Open: cd lottie-react-native and Install: npm install
  3. Run npm start to start the packager.
  4. ... error

node 7.4.0
npm 4.1.2

One liner to reproduce.

git clone https://github.com/airbnb/lottie-react-native.git lottie-react-native && cd $_; npm install; npm start;

Looking for JS files in
   ./lottie-react-native 

Loading dependency graph...
React packager ready.

Failed to build DependencyGraph: @providesModule naming collision:
  Duplicate module name: deprecated
  Paths: ./lottie-react-native/node_modules/react-native/local-cli/server/middleware/heapCapture/bundle.js collides with ./lottie-react-native/node_modules/react-native/Libraries/Renderer/src/shared/utils/deprecated.js

This error is caused by a @providesModule declaration with the same name across two different files.
Error: @providesModule naming collision:
  Duplicate module name: deprecated
  Paths: ./lottie-react-native/node_modules/react-native/local-cli/server/middleware/heapCapture/bundle.js collides with ./lottie-react-native/node_modules/react-native/Libraries/Renderer/src/shared/utils/deprecated.js

This error is caused by a @providesModule declaration with the same name across two different files.
    at HasteMap._updateHasteMap (./lottie-react-native/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:158:13)
    at module.getName.then.name (./lottie-react-native/node_modules/react-native/packager/react-packager/src/node-haste/DependencyGraph/HasteMap.js:119:31)

npm ERR! Darwin 15.6.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "start"
npm ERR! node v7.4.0
npm ERR! npm  v4.1.2
npm ERR! code ELIFECYCLE
npm ERR! [email protected] start: `node node_modules/react-native/local-cli/cli.js start`
npm ERR! Exit status 1

Loop prop isnt working

I have a very simple view as you can see:

import React from 'react';
import {
  Animated,
  StyleSheet,
  View,
} from 'react-native';
import Animation from 'lottie-react-native';

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'space-around',
    alignItems: 'center',
  },
  animationContainer: {
    alignItems: 'center',
    justifyContent: 'center',
    flexDirection: 'column',
  },
  animation: {
    width: 400,
    height: 400,
  },
});

export default class Loading extends React.Component {
  constructor(props) {
    super(props);
    this.state = {
      progress: new Animated.Value(0),
    };
  }

  componentDidMount() {
    Animated.timing(this.state.progress, {
      toValue: 1,
      duration: 5000,
    }).start();
  }

  render() {
    return (
      <View style={styles.container}>
        <View style={styles.animationContainer}>
          <Animation
            style={styles.animation}
          // eslint-disable-next-line global-require
            source={require('./animation.json')}
            progress={this.state.progress}
            loop
          />
        </View>
      </View>
    );
  }
}

Im just trying to loop the animation, but no luck so far. Not sure if this is RN issue o lottie for iOS.

Im on

react-native-cli: 1.0.0
react-native: 0.40.0
``

duplicate interface definition for class 'RCTView'

In file included from ./node_modules/lottie-react-native/lib/ios/LottieReactNative/LottieContainerView.m:9: In file included from ./node_modules/lottie-react-native/lib/ios/LottieReactNative/LottieContainerView.h:12: ../../../react-native/React/Views/RCTView.h:21:1: error: duplicate interface definition for class 'RCTView'

lottie-react-native: 1.0.1,
react-native 0.41.0,

Full error log: https://gist.github.com/zawarudo/ec17df88555b58a483ed81c86e98e171

Similar to
react-native-maps/react-native-maps#937
react-native-maps/react-native-maps#957

Android build failed

Hi I tried with v1.0.5 and i got this after linking

Information:Gradle tasks [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:mockableAndroidJar, :app:prepareDebugUnitTestDependencies]

C:\Users\kkl%20kwong\Desktop\JobStreet\react_native_source_code\TestProject1\node_modules\lottie-react-native\lib\android\build\intermediates\exploded-aar\com.android.support\appcompat-v7\25.0.1\res\drawable\abc_textfield_search_material.xml

Error:(18, 87) No resource found that matches the given name (at 'drawable' with value '@drawable/abc_textfield_search_activated_mtrl_alpha').

Error:(19, 89) No resource found that matches the given name (at 'drawable' with value '@drawable/abc_textfield_search_activated_mtrl_alpha').

Error:Execution failed for task ':lottie-react-native/:processReleaseResources'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'D:\Android\sdk\build-tools\25.0.1\aapt.exe'' finished with non-zero exit value 1

My Android SDK manager download status is as below:

  1. Android Build-Tools: 25.0.1
  2. Android SDK Platform tools: 25.0.3
  3. Android SDK Tools: 25.2.5

Any clue?

Animations not showing on iOS

Hi,

I've installed lottie-react-native and setup the code examples using the animation data, but it's just showing a blank screen and giving no error. Could you please let me know if I've missed any steps? (For example, do I need to install Lottie for iOS independently?)

Many thanks in advance for your help, and for the library, it looks awesome if I can get it up and running!

I ran:
npm install --save lottie-react-native

then to meet the required deps:
npm install --save [email protected]
npm install --save-dev babel-preset-airbnb

Then, using the code from the docs, where path/to/animation.json is a valid path to the animation data copied from the example project:

import React from 'react';
import Animation from 'lottie-react-native';

export default class BasicExample extends React.Component {
  componentDidMount() {
    this.animation.play();
  }

  render() {
    return (
      <Animation
        ref={animation => { this.animation = animation; }}
        style={{
          width: 200,
          height: 200,
        }}
        source={require('../path/to/animation.json')}
      />
    );
  }
}

Where to find JSON adobe effect animation

Hello,

It's not really an issue but I completely shit on adobe (I never use it).
Do you know if there is any site where I can find some animation in JSON ?

Regards

ratios off from web

Thanks for the lib :)

I downloaded a json file from lottiefiles.com and it's all goofed up:

image

I copy/pasted the example code from the README. The animation looks great on the web, is there some prop I need? It reminds me of screwing up the viewbox values in an svg.

Thanks.

Cannot read property 'Commands' of undefined

It doesn't appear that your React Native support for Android works.

AirbnbLottieView in undefined in Animation.js line 97 when calling UIManager.AirbnbLottieView.Commands[commandName]

Where is this coming from?

After some source digging I believe it should be called LottieAnimationView instead.

lottie-android 1.5 support in react native?

I was really excited to hear that pre-compositions and images are now supported in the last version of Lottie for Android.

However, introducing the new update (1.5.2) through both my app's build.gradle or the lottie-react-native build.gradle in node_modules leads to a null object exception in the parseLayers method of LottieComposition.java

Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int org.json.JSONArray.length()' on a null object reference at com.airbnb.lottie.LottieComposition$Factory.parseLayers(LottieComposition.java:200) at com.airbnb.lottie.LottieComposition$Factory.fromJsonSync(LottieComposition.java:194)

I tried the new update with my animations in a pure Android app and it works totally fine.

Is this error due to lottie-react-native being behind lottie-android? When do you think an update will come? Or am I doing something wrong?

ios build failed

RN version :0.41.2
after npm i --save lottie-react-native
react-native link lottie-ios
react-native link lottie-react-native/

509e06fa-21e6-4935-adeb-50660ac22161

Build on React Native error and run simulator from command line crashed

Version

react-native : 0.41.1
lottie-react-native: 1.0.6
lottie-ios: 1.0.2
Xcode: 8.2.1

Install & Link follow by ReadMe

npm i --save lottie-react-native
react-native link lottie-ios
react-native link lottie-react-native

Then run simulator: react-native run-ios build error:

Undefined symbols for architecture i386:
  "_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 i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

** BUILD FAILED **

I searched same issues and solution Cannot build on React Native 0.41.2 #59 add Lottie.framwork to App's Link Binary with Libraries.

Now react-native run-ios build success, install App OK. but crashed. use react-native ios-log

NOTE:  Most system logs have moved to a new logging system.  See log(1) for more information.
Feb 17 14:58:20 xxxxxxs-MacBook-Pro CoreSimulatorBridge[28303] <Warning>: Got LSBundleProxy for 'com.xxxxxx.app', sequenceNumber 75, cacheGUID <__NSConcreteUUID 0x794620e0> 3D698A13-B724-46D7-A441-968CE563C13C
Feb 17 14:58:20 xxxxxxs-MacBook-Pro assertiond[28299] <Error>: assertion failed: 16D32 13E233: assertiond + 16726 [1BD9E3D0-5485-3412-86B2-4BE50C825E80]: 0x1
Feb 17 14:58:20 xxxxxxs-MacBook-Pro Unknown[28299] <Error>:
Feb 17 14:58:20 xxxxxxs-MacBook-Pro CoreSimulatorBridge[28303] <Warning>: Launch successful for 'com.xxxxxx.app'
Feb 17 14:58:20 xxxxxxs-MacBook-Pro com.apple.CoreSimulator.SimDevice.96E91E0D-6637-4C26-9947-8491B2EC7034.launchd_sim[28278] (UIKitApplication:com.xxxxxx.app[0xbad3][29456]) <Notice>: Service exited due to signal: Trace/BPT trap: 5
Feb 17 14:58:20 xxxxxxs-MacBook-Pro SpringBoard[28295] <Warning>: Application 'UIKitApplication:com.xxxxxx.app[0xbad3]' crashed.
Feb 17 14:58:20 xxxxxxs-MacBook-Pro assertiond[28299] <Error>: assertion failed: 16D32 13E233: assertiond + 16726 [1BD9E3D0-5485-3412-86B2-4BE50C825E80]: 0x1
Feb 17 14:58:20 xxxxxxs-MacBook-Pro Unknown[28299] <Error>:
Feb 17 14:58:20 xxxxxxs-MacBook-Pro SpringBoard[28295] <Warning>: Reply Error: Connection interrupted
Feb 17 14:58:31 xxxxxxs-MacBook-Pro CoreSimulatorBridge[28303] <Warning>: Pasteboard change listener callback port <NSMachPort: 0x78e57ef0> registered

Click App icon again:

Feb 17 14:59:06 xxxxxxs-MacBook-Pro assertiond[28299] <Error>: assertion failed: 16D32 13E233: assertiond + 16726 [1BD9E3D0-5485-3412-86B2-4BE50C825E80]: 0x1
Feb 17 14:59:06 xxxxxxs-MacBook-Pro Unknown[28299] <Error>:
Feb 17 14:59:06 xxxxxxs-MacBook-Pro com.apple.CoreSimulator.SimDevice.96E91E0D-6637-4C26-9947-8491B2EC7034.launchd_sim[28278] (UIKitApplication:com.xxxxxx.app[0xa1b2][29484]) <Notice>: Service exited due to signal: Trace/BPT trap: 5
Feb 17 14:59:06 xxxxxxs-MacBook-Pro SpringBoard[28295] <Warning>: Application 'UIKitApplication:com.xxxxxx.app[0xa1b2]' crashed.
Feb 17 14:59:06 xxxxxxs-MacBook-Pro assertiond[28299] <Error>: assertion failed: 16D32 13E233: assertiond + 16726 [1BD9E3D0-5485-3412-86B2-4BE50C825E80]: 0x1
Feb 17 14:59:06 xxxxxxs-MacBook-Pro Unknown[28299] <Error>:
Feb 17 14:59:07 xxxxxxs-MacBook-Pro SpringBoard[28295] <Warning>: Reply Error: Connection interrupted

And I find it can be run from Xcode, CMD+R, No Error.

How can I run simulator from command line, Anyone can help me? thanks.

1.0.4 Build Missing Header / Errors

I recently tried to update to latest build (1.0.4) and got some issues:

First the LottieReactNative projects asks for the Lottie.h

image

Then if I update the header path to include the path $(SRCROOT)/../../../lottie-ios then I get a bunch of errors:

image

image

Any ideas?

RN 0.38.0 / Latest OSX / XCode

Loop animation property

First of all: ๐Ÿ‘ ๐Ÿ‘ ๐Ÿ‘

Would be nice to have a convenient way of starting looped animations! So not only calling play() but also loop()

iOS with cocoapods error - "Unknown receiver 'LAAnimationView'; did you mean 'LOTAnimationView'?"

On version 1.0.5 - I'm getting the specified error (Unknown receiver 'LAAnimationView'; did you mean 'LOTAnimationView'?) when trying to run my project from Xcode.
The problematic file is:

myProject/node_modules/lottie-react-native/lib/ios/LottieReactNative

When replacing all occurrences of LAAnimationView with LOTAnimationView the project compiles and I'm able to display animations correctly.
But still I can't use it this way since the repo is shared by a lot of developers and every npm install will result in compilation error.

Any solution?

Issues with Building

Tried installing via:

yarn add lottie-react-native
react-native link lottie-react-native

Fixed the header paths (See: #12) but then got error saying it could not find the lottie headers.

So I tried to install via CocoaPods but got this error:

pod 'lottie-react-native', :path => '../node_modules/lottie-react-native'

image

/Users/...LottieReactNative/LottieAnimationViewManager.m:40:37: Incompatible block pointer types sending 'void (^)(RCTUIManager *__strong, NSDictionary<NSNumber *,UIView *> *__strong)' to parameter of type 'RCTViewManagerUIBlock' (aka 'void (^)(RCTUIManager *__strong, RCTSparseArray *__strong)')

Maybe some conflict with React/RN versions, I saw the Cocoa Pod installs react which seems kind of odd.
image

I am using:

"react": "15.3.2",
"react-native": "0.36.0",

Any ideas? It seems the building for this project still needs some work, but its worth it ๐Ÿ‘

Update - Want to clarify, I was able to build the example fine (however some of the animations did not play) but when I try to integrate into existing project is where the errors above occur.

Build Failed

Hello guys , so i updated my lottie-react-native doucments to the latest version 1.0.1 and i'm running RN 0.41.0 and there's still a failure , the animation not appearing at all and here's what the terminal says :
screen shot 2017-02-03 at 12 36 25

Animation is not loading from the view

does it support react-native 0.41.0 and lottie 1.0.5 now?

I had to remove the callings from podfile because the official have suggested not to use podfile anymore.

target 'example' do
  pod 'React', :path => '../../node_modules/react-native', :subspecs => [
    'Core',
    'RCTImage',
    'RCTNetwork',
    'RCTText',
    'RCTWebSocket',
    'RCTAnimation',
    # Add any other subspecs you want to use in your project
  ]
  pod 'lottie-react-native', :path => '../../'
end

these are removed

I have use rnpm and link the modules successfully under 1.0.5.. let me know if it is working now. I tested by using the sample animations provided by the example project and required with the correct path. what is the issue?

cant get the examples to work

latest react-native. copy pasted both examples and tried it with attached data.json to no avail. i just get a blank screen. clearly it has worked for people. i m not sure wht i m doing wrong. help?
data.json.zip

Text support?

Does lottie support text? I have tried using system supported fonts but I can't run animation. Same animation without text is running on Android device.

Cannot build on React Native 0.41.2

Current behavior:

Cannot build.

Reproduce:

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

โ””โ”€โ”ฌ [email protected] 
  โ”œโ”€โ”€ [email protected] 
  โ””โ”€โ”ฌ [email protected] 
    โ””โ”€โ”€ [email protected] 

$ 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.

How to add JSON with source?

I can run the example JSON .
and run the JSON without Image source export by AE

but can't run the JSON by use Image source export by AE

JSON :

{"v":"4.5.9","fr":25,"ip":0,"op":750,"w":750,"h":1334,"ddd":0,"assets":[{"id":"image_0","w":154,"h":154,"u":"images/","p":"img_0.png"},{"id":"image_1","w":154,"h":154,"u":"images/","p":"img_1.png"},{"id":"image_2","w":154,"h":154,"u":"images/","p":"img_2.png"},{"id":"image_3","w":154,"h":154,"u":"images/","p":"img_3.png"}],"layers":[{"ddd":0,"ind":0,"ty":2,"nm":"img_0.png","cl":"png","refId":"image_0","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":0,"s":[159,1415,0],"e":[349,485,0],"to":[31.6666660308838,-155,0],"ti":[-279.666656494141,-620,0]},{"t":45}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":0,"s":[100,100,100],"e":[86,86,100]},{"t":45}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":1,"ty":2,"nm":"img_0.png","cl":"png","refId":"image_0","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[285,1591,0],"e":[269,1131,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[-10.6666669845581,184.33332824707,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":11,"s":[269,1131,0],"e":[349,485,0],"to":[10.6666669845581,-184.33332824707,0],"ti":[-279.666656494141,-620,0]},{"t":56}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":11,"s":[100,100,100],"e":[86,86,100]},{"t":56}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":2,"ty":2,"nm":"img_1.png","cl":"png","refId":"image_1","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[493.863,1633.527,0],"e":[477.863,1173.527,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[24.1438236236572,191.421157836914,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":5,"s":[477.863,1173.527,0],"e":[349,485,0],"to":[-24.1438236236572,-191.421157836914,0],"ti":[232.33332824707,-272,0]},{"t":21}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":0,"s":[100,100,100],"e":[86,86,100]},{"t":16}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":3,"ty":2,"nm":"img_1.png","cl":"png","refId":"image_1","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[184,1544,0],"e":[168,1084,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[-27.5,176.5,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":5,"s":[168,1084,0],"e":[349,485,0],"to":[27.5,-176.5,0],"ti":[-279.666656494141,-620,0]},{"t":50}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":0,"s":[100,100,100],"e":[86,86,100]},{"t":45}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":4,"ty":2,"nm":"img_2.png","cl":"png","refId":"image_2","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[247,1522,0],"e":[231,1062,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[-17,172.83332824707,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":3,"s":[231,1062,0],"e":[349,485,0],"to":[17,-172.83332824707,0],"ti":[-279.666656494141,-620,0]},{"t":48}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":3,"s":[100,100,100],"e":[86,86,100]},{"t":48}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":5,"ty":2,"nm":"img_3.png","cl":"png","refId":"image_3","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[459,1653,0],"e":[443,1193,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[18.3333339691162,194.66667175293,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":6,"s":[443,1193,0],"e":[349,485,0],"to":[-18.3333339691162,-194.66667175293,0],"ti":[-55.6666679382324,76,0]},{"t":25}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":6,"s":[100,100,100],"e":[86,86,100]},{"t":25}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":6,"ty":2,"nm":"img_3.png","cl":"png","refId":"image_3","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[183,1577,0],"e":[167,1117,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[-27.6666660308838,182,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":16,"s":[167,1117,0],"e":[349,485,0],"to":[27.6666660308838,-182,0],"ti":[-279.666656494141,-620,0]},{"t":61}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":16,"s":[100,100,100],"e":[86,86,100]},{"t":61}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":7,"ty":2,"nm":"img_2.png","cl":"png","refId":"image_2","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":0,"s":[362,1591,0],"e":[349,485,0],"to":[-2.16666674613953,-184.33332824707,0],"ti":[-231.66667175293,-152,0]},{"t":45}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":0,"s":[100,100,100],"e":[86,86,100]},{"t":45}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":8,"ty":2,"nm":"img_1.png","cl":"png","refId":"image_1","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":0,"s":[324,1522,0],"e":[349,485,0],"to":[4.16666650772095,-172.83332824707,0],"ti":[-71.6666641235352,-36,0]},{"t":25}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":0,"s":[100,100,100],"e":[86,86,100]},{"t":45}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":9,"ty":2,"nm":"img_2.png","cl":"png","refId":"image_2","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[639,1583,0],"e":[623,1123,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[48.3333320617676,183,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":7,"s":[623,1123,0],"e":[349,485,0],"to":[-48.3333320617676,-183,0],"ti":[428.333343505859,-672,0]},{"t":31}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":7,"s":[100,100,100],"e":[86,86,100]},{"t":31}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":10,"ty":2,"nm":"img_3.png","cl":"png","refId":"image_3","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":0,"s":[578,1615,0],"e":[349,485,0],"to":[-38.1666679382324,-188.33332824707,0],"ti":[272.333343505859,-456,0]},{"t":45}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":0,"s":[100,100,100],"e":[86,86,100]},{"t":45}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1},{"ddd":0,"ind":11,"ty":2,"nm":"img_0.png","cl":"png","refId":"image_0","ks":{"o":{"a":0,"k":100},"r":{"a":0,"k":0},"p":{"a":1,"k":[{"i":{"x":0.833,"y":1},"o":{"x":0.333,"y":0},"n":"0p833_1_0p333_0","t":0,"s":[562,1583,0],"e":[546,1123,0],"to":[-2.66666674613953,-76.6666641235352,0],"ti":[35.5,183,0]},{"i":{"x":0,"y":1},"o":{"x":0.333,"y":0},"n":"0_1_0p333_0","t":4,"s":[546,1123,0],"e":[349,485,0],"to":[-35.5,-183,0],"ti":[224.33332824707,-108,0]},{"t":23}]},"a":{"a":0,"k":[77,77,0]},"s":{"a":1,"k":[{"i":{"x":[0.692,0.692,0.667],"y":[1,1,0.667]},"o":{"x":[0.662,0.662,0.333],"y":[0,0,0.333]},"n":["0p692_1_0p662_0","0p692_1_0p662_0","0p667_0p667_0p333_0p333"],"t":4,"s":[100,100,100],"e":[86,86,100]},{"t":23}]}},"ao":0,"ip":0,"op":750,"st":0,"bm":0,"sr":1}]}

cannot override getUseDeveloperSupport() as protected

When I execute : npm run run:android, I have this error

/***/lottie-react-native/example/android/app/src/main/java/com/example/MainApplication.java:21: error: getUseDeveloperSupport() in <anonymous com.example.MainApplication$1> cannot override getUseDeveloperSupport() in ReactNativeHost
    protected boolean getUseDeveloperSupport() {
                      ^
  attempting to assign weaker access privileges; was public
1 error
:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

Changing "protected" to "public" corrects the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.