This likely has to do with AndroidX or other things of which I am somewhat ignorant, but here's what I can share:
I had react-native-reanimated working fine in my RN 0.60.5 app. Today I tried to upgrade to RN 0.61, and the Android build (via react-native run-android) stopped working. It gave an error message like this:
/.../android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:37: error: package com.swmansion.reanimated does not exist
import com.swmansion.reanimated.ReanimatedPackage;
^
/.../android/app/build/generated/rncli/src/main/java/com/facebook/react/PackageList.java:89: error: cannot find symbol
new ReanimatedPackage(),
^
symbol: class ReanimatedPackage
location: class PackageList
2 errors
FAILURE: Build failed with an exception.
I examined the changes to the android directory of the RN template that occurred between 0.60.5 and 0.61, and this one looks relevant: https://github.com/facebook/react-native/pull/25810
When I re-add the supportLibVersion line to my android/build.gradle, the build seems to work again. I'm not sure if this is proper or if it implies something is going wrong with the jetify process for this library.
Closing as of #395
So add supportLibVersion to build.gradle is a solution of this problem?
So add
supportLibVersionto build.gradle is a solution of this problem?
It didn't work in our case, not that it's particularly helpful for you, since it might work in your project!
@inferusvv It is a workaround that might work for you if you were in a similar situation to me: my build was working with RN 0.60.5 but not after upgrading to RN 0.61 using the react-native upgrade script.
The long-term solution is for the library to support AndroidX, which it appears was merged in #395 and will presumably be in the next release.
Confirming I had this issue, as well, upgrading from RN 0.60.5 > 0.61.1 and readding supportLibVersion = '28.0.0' to android/build.gradle solved it.
Could someone explain, why supportLibVersion was removed from build.gradle in last RN version and why it is required for this library? I am just not familiar with native android development and very interested in it.
I already have the supportLibVersion in my build.gradle but i am still getting these build errors on RN 0.61.2
Logs
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.Arguments;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.Callback;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:7: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.GuardedRunnable;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:8: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:9: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReactContext;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:10: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:11: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.UiThreadUtil;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:12: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:13: error: package com.facebook.react.modules.core does not exist
import com.facebook.react.modules.core.DeviceEventManagerModule;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:14: error: package com.facebook.react.modules.core does not exist
import com.facebook.react.modules.core.ReactChoreographer;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:15: error: cannot find symbol
import com.facebook.react.uimanager.GuardedFrameCallback;
^
symbol: class GuardedFrameCallback
location: package com.facebook.react.uimanager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:16: error: cannot find symbol
import com.facebook.react.uimanager.ReactShadowNode;
^
symbol: class ReactShadowNode
location: package com.facebook.react.uimanager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:17: error: cannot find symbol
import com.facebook.react.uimanager.UIImplementation;
^
symbol: class UIImplementation
location: package com.facebook.react.uimanager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:18: error: cannot find symbol
import com.facebook.react.uimanager.UIManagerModule;
^
symbol: class UIManagerModule
location: package com.facebook.react.uimanager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:20: error: package com.facebook.react.uimanager.events does not exist
import com.facebook.react.uimanager.events.Event;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:21: error: package com.facebook.react.uimanager.events does not exist
import com.facebook.react.uimanager.events.EventDispatcherListener;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:55: error: cannot find symbol
public class NodesManager implements EventDispatcherListener {
^
symbol: class EventDispatcherListener
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/Node.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/Node.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.UiThreadUtil;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/Node.java:18: error: cannot find symbol
import javax.annotation.Nullable;
^
symbol: class Nullable
location: package javax.annotation
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableArray;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:4: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableArray;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:7: error: package com.facebook.react.uimanager.events does not exist
import com.facebook.react.uimanager.events.RCTEventEmitter;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:13: error: cannot find symbol
import javax.annotation.Nullable;
^
symbol: class Nullable
location: package javax.annotation
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:15: error: cannot find symbol
public class EventNode extends Node implements RCTEventEmitter {
^
symbol: class RCTEventEmitter
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:65: error: cannot find symbol
private final UIImplementation mUIImplementation;
^
symbol: class UIImplementation
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:66: error: package DeviceEventManagerModule does not exist
private final DeviceEventManagerModule.RCTDeviceEventEmitter mEventEmitter;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:67: error: cannot find symbol
private final ReactChoreographer mReactChoreographer;
^
symbol: class ReactChoreographer
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:68: error: cannot find symbol
private final GuardedFrameCallback mChoreographerCallback;
^
symbol: class GuardedFrameCallback
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:69: error: package UIManagerModule does not exist
private final UIManagerModule.CustomEventNamesResolver mCustomEventNamesResolver;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java:4: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableType;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java:7: error: cannot find symbol
import javax.annotation.Nullable;
^
symbol: class Nullable
location: package javax.annotation
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:72: error: cannot find symbol
private final ReactContext mContext;
^
symbol: class ReactContext
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:73: error: cannot find symbol
private final UIManagerModule mUIManager;
^
symbol: class UIManagerModule
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:76: error: cannot find symbol
private ConcurrentLinkedQueue<Event> mEventQueue = new ConcurrentLinkedQueue<>();
^
symbol: class Event
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:94: error: cannot find symbol
public NodesManager(ReactContext context) {
^
symbol: class ReactContext
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:227: error: cannot find symbol
public void createNode(int nodeID, ReadableMap config) {
^
symbol: class ReadableMap
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:340: error: cannot find symbol
public void enqueueUpdateViewOnNativeThread(int viewTag, WritableMap nativeProps) {
^
symbol: class WritableMap
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:368: error: cannot find symbol
public void getValue(int nodeID, Callback callback) {
^
symbol: class Callback
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:383: error: cannot find symbol
public void onEventDispatch(Event event) {
^
symbol: class Event
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:394: error: cannot find symbol
private void handleEvent(Event event) {
^
symbol: class Event
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:407: error: cannot find symbol
public void sendEvent(String name, WritableMap body) {
^
symbol: class WritableMap
location: class NodesManager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/Node.java:34: error: cannot find symbol
public Node(int nodeID, @Nullable ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class Node
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:44: error: cannot find symbol
private static List<EventMap> processMapping(ReadableArray mapping) {
^
symbol: class ReadableArray
location: class EventNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:55: error: cannot find symbol
public EventNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class EventNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:61: error: cannot find symbol
public void receiveEvent(int targetTag, String eventName, @Nullable WritableMap event) {
^
symbol: class WritableMap
location: class EventNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:76: error: cannot find symbol
public void receiveTouches(String eventName, WritableArray touches, WritableArray changedIndices) {
^
symbol: class WritableArray
location: class EventNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:76: error: cannot find symbol
public void receiveTouches(String eventName, WritableArray touches, WritableArray changedIndices) {
^
symbol: class WritableArray
location: class EventNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ValueNode.java:13: error: cannot find symbol
public ValueNode(int nodeID, @Nullable ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class ValueNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:86: error: cannot find symbol
public WritableMap mNativeProps;
^
symbol: class WritableMap
location: class NodesManager.NativeUpdateOperation
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/NodesManager.java:87: error: cannot find symbol
public NativeUpdateOperation(int viewTag, WritableMap nativeProps) {
^
symbol: class WritableMap
location: class NodesManager.NativeUpdateOperation
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:21: error: cannot find symbol
public EventMap(ReadableArray eventPath) {
^
symbol: class ReadableArray
location: class EventMap
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/EventNode.java:30: error: cannot find symbol
public Double lookupValue(ReadableMap event) {
^
symbol: class ReadableMap
location: class EventMap
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/DebugNode.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/DebugNode.java:13: error: cannot find symbol
public DebugNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class DebugNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.Arguments;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.JavaOnlyMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:7: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:8: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMapKeySetIterator;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:9: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableType;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:10: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableArray;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:11: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:12: error: cannot find symbol
import com.facebook.react.uimanager.ReactStylesDiffMap;
^
symbol: class ReactStylesDiffMap
location: package com.facebook.react.uimanager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:13: error: cannot find symbol
import com.facebook.react.uimanager.UIImplementation;
^
symbol: class UIImplementation
location: package com.facebook.react.uimanager
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:22: error: cannot find symbol
private final UIImplementation mUIImplementation;
^
symbol: class UIImplementation
location: class PropsNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:25: error: cannot find symbol
private final JavaOnlyMap mPropMap;
^
symbol: class JavaOnlyMap
location: class PropsNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:26: error: cannot find symbol
private final ReactStylesDiffMap mDiffMap;
^
symbol: class ReactStylesDiffMap
location: class PropsNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:28: error: cannot find symbol
private static void addProp(WritableMap propMap, String key, Object value) {
^
symbol: class WritableMap
location: class PropsNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:52: error: cannot find symbol
ReadableMap config,
^
symbol: class ReadableMap
location: class PropsNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/PropsNode.java:54: error: cannot find symbol
UIImplementation uiImplementation) {
^
symbol: class UIImplementation
location: class PropsNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/SetNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/SetNode.java:4: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/SetNode.java:11: error: cannot find symbol
public SetNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class SetNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/CondNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/CondNode.java:10: error: cannot find symbol
public CondNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class CondNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/OperatorNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.JSApplicationIllegalArgumentException;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/OperatorNode.java:4: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/OperatorNode.java:224: error: cannot find symbol
public OperatorNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class OperatorNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/FunctionNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/FunctionNode.java:10: error: cannot find symbol
public FunctionNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class FunctionNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/BezierNode.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/BezierNode.java:66: error: cannot find symbol
public BezierNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class BezierNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ParamNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ParamNode.java:13: error: cannot find symbol
public ParamNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class ParamNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.Arguments;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java:4: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableArray;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/JSCallNode.java:14: error: cannot find symbol
public JSCallNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class JSCallNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/BlockNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/BlockNode.java:11: error: cannot find symbol
public BlockNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class BlockNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ConcatNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/ConcatNode.java:10: error: cannot find symbol
public ConcatNode(int nodeID, ReadableMap config, NodesManager nodesManager) {
^
symbol: class ReadableMap
location: class ConcatNode
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java:3: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.JavaOnlyMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java:4: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.ReadableMap;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java:5: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableArray;
^
/Users/home/Desktop/APLIKACE/TestNew/TestGit/Test/node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/nodes/StyleNode.java:6: error: package com.facebook.react.bridge does not exist
import com.facebook.react.bridge.WritableMap;
I am still facing this.
My package.json:
{
"name": "MyApp",
"version": "4.2.0",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start",
"postversion": "react-native-version",
"test": "jest",
"lint": "eslint .",
"postinstall": "npx jetify"
},
"dependencies": {
"@react-native-community/async-storage": "^1.6.2",
"axios": "^0.19.0",
"i18n-js": "^3.5.0",
"js-sha256": "^0.9.0",
"lodash": "^4.17.15",
"lodash.memoize": "^4.1.2",
"moment": "^2.24.0",
"otplib": "^11.0.1",
"prop-types": "^15.7.2",
"react": "16.9.0",
"react-native": "0.61.2",
"react-native-app-link": "^1.0.0",
"react-native-blink-view": "^0.0.6",
"react-native-camera": "^3.9.0",
"react-native-crypto": "^2.2.0",
"react-native-device-info": "^4.0.1",
"react-native-elements": "^1.2.6",
"react-native-firebase": "^5.5.6",
"react-native-flash-message": "^0.1.15",
"react-native-gesture-handler": "^1.4.1",
"react-native-linear-gradient": "^2.5.6",
"react-native-localize": "^1.3.1",
"react-native-app-commons": "https://bitbucket.org/app/react-native-app-commons#RELEASE-4.2.0",
"react-native-progress": "^4.0.1",
"react-native-progress-circle": "^2.1.0",
"react-native-qrcode-scanner": "^1.2.3",
"react-native-randombytes": "^3.5.3",
"react-native-rate": "^1.1.10",
"react-native-reanimated": "^1.3.0",
"react-native-screens": "^1.0.0-alpha.23",
"react-native-share": "^2.0.0",
"react-native-splash-screen": "^3.2.0",
"react-native-svg": "^9.12.0",
"react-native-svg-transformer": "^0.13.0",
"react-native-swipeout": "^2.3.6",
"react-native-touch-id": "^4.4.1",
"react-native-vector-icons": "^6.6.0",
"react-native-webview": "^7.4.2",
"react-navigation": "^4.0.10",
"react-navigation-drawer": "^2.3.1",
"react-navigation-hooks": "^1.1.0",
"react-navigation-stack": "^1.10.2",
"react-navigation-tabs": "^2.5.6",
"react-redux": "^7.1.1",
"redux": "^4.0.4",
"redux-devtools-extension": "^2.13.8",
"redux-persist": "^6.0.0",
"redux-thunk": "^2.3.0",
"reselect": "^4.0.0",
"url-parse": "^1.4.7"
},
"devDependencies": {
"@babel/core": "^7.6.4",
"@babel/runtime": "^7.6.3",
"@react-native-community/eslint-config": "^0.0.5",
"babel-jest": "^24.9.0",
"eslint": "^6.5.1",
"jest": "^24.9.0",
"metro-react-native-babel-preset": "^0.56.0",
"react-native-version": "^3.2.0",
"react-test-renderer": "16.9.0"
},
"jest": {
"preset": "react-native"
},
"react-native": {
"crypto": "react-native-crypto"
},
"browser": {
"crypto": "react-native-crypto"
}
}
Command used to run:
rm -rf node_modules && yarn && rm -rf ~/.gradle/caches/* && ./scripts/buildAndroidRelease.sh
I also get the same issue when updating react-native-reanimated to 1.4.0
I managed to fix this by adding this into my build.gradle
allprojects {
tasks.withType(Javadoc).all { enabled = false }
None of the fix above fixed it for me, I'm using expo navigation and it recommends and installed ~1.1.0. IF I install 1.4.0 it will show error or warning that doesn't look good, but the bug is still there.
For me, the build failed because I still had the code suggested in this comment in my build.gradle. Removing that code, together with the supportLibVersion line and upgrading to 1.4.0 did it for me.
@lbornov2 Oh my god, thank you. This solved my issue.
Using RN 0.62.2 and reanimated version 1.8 I still had the error and had to use the fix @lbornov2 mentioned. so maybe the problem isn't solved completely yet?
i am also having this issue. RN version is 0.62
I'm also having the same issue with RN 0.62 and reanimated version 1.8
@aminify, @amilaDulanjana, @neeshsilva, @v1b3m
Could you guys include example repository which will repro this? We can't do anything about it without reproducing it locally.
RN 0.62.2 and reanimated 1.9.0
This worked for me:
At root project.
npm install -g jetifier
npx jetify
As for me, I made a stupid mistake of looking at v2 documentation when I have 1.13 installed LOLs
@lbornov2 saved my ass:
allprojects {
tasks.withType(Javadoc).all { enabled = false }
...
}
Most helpful comment
I am still facing this.
My package.json:
Command used to run:
I also get the same issue when updating
react-native-reanimatedto1.4.0I managed to fix this by adding this into my
build.gradle