Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

React Native Shared Element is incompatible with expo@52 #127

Open
Lychas opened this issue Jan 12, 2025 · 9 comments
Open

React Native Shared Element is incompatible with expo@52 #127

Lychas opened this issue Jan 12, 2025 · 9 comments

Comments

@Lychas
Copy link

Lychas commented Jan 12, 2025

I'm trying to build my android build and it seems that React Native Shared Element is incompatible and causes the build to fail.

> Task :react-native-shared-element:compileDebugJavaWithJavac FAILED
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:51: warning: [removal] ReactViewBackgroundDrawable in com.facebook.react.views.view has been deprecated and marked for removal
  private ReactViewBackgroundDrawable mReactViewBackgroundDrawableCache = null;
          ^
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:299: warning: [removal] ReactViewBackgroundDrawable in com.facebook.react.views.view has been deprecated and marked for removal
    ReactViewBackgroundDrawable drawable = mReactViewBackgroundDrawableCache;
    ^
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:301: warning: [removal] ReactViewBackgroundDrawable in com.facebook.react.views.view has been deprecated and marked for removal
      drawable = new ReactViewBackgroundDrawable(mContent.view.getContext());
                     ^
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:301: warning: [removal] ReactViewBackgroundDrawable(Context) in ReactViewBackgroundDrawable has been deprecated and marked for removal
      drawable = new ReactViewBackgroundDrawable(mContent.view.getContext());
                 ^
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:314: error: method setBorderColor in class CSSBackgroundDrawable cannot be applied to given types;
      drawable.setBorderColor(i, borderColorRGB, borderColorAlpha);
              ^
  required: int,Integer
  found:    int,float,float
  reason: actual and formal argument lists differ in length
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:317: warning: [removal] setRadius(float,int) in CSSBackgroundDrawable has been deprecated and marked for removal
    drawable.setRadius(style.borderTopLeftRadius, 0);
            ^
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:318: warning: [removal] setRadius(float,int) in CSSBackgroundDrawable has been deprecated and marked for removal
    drawable.setRadius(style.borderTopRightRadius, 1);
            ^
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:319: warning: [removal] setRadius(float,int) in CSSBackgroundDrawable has been deprecated and marked for removal
    drawable.setRadius(style.borderBottomRightRadius, 2);
            ^
/home/expo/workingdir/build/node_modules/react-native-shared-element/android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java:320: warning: [removal] setRadius(float,int) in CSSBackgroundDrawable has been deprecated and marked for removal
    drawable.setRadius(style.borderBottomLeftRadius, 3);
            ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
8 warnings
Copy link

Hey! Thanks for opening the issue. The issue doesn't seem to contain a link to a repro (a snack.expo.dev link or link to a GitHub repo under your username).

Can you provide a minimal repro which demonstrates the issue? A repro will help us debug the issue faster. Please try to keep the repro as small as possible and make sure that we can run it without additional setup.

@chandresh8187
Copy link

i am also facing same

@IjzerenHein
Copy link
Owner

With introduction of the latest react-native version, some internals were changed which broke compatibility with react-native-shared-element. I've just published a pre-release (v0.9.0-rc0) as next to NPM which should fix the compatibility problem.

You can install it using yarn add react-native-shared-element@next (or whichenever package manager you are using)

Please let me know if that resolves the problem for you 🙏

@LegendProjects
Copy link

With introduction of the latest react-native version, some internals were changed which broke compatibility with react-native-shared-element. I've just published a pre-release (v0.9.0-rc0) as next to NPM which should fix the compatibility problem.

You can install it using yarn add react-native-shared-element@next (or whichenever package manager you are using)

Please let me know if that resolves the problem for you 🙏

You cannot use in expo sdk 52 SharedElements is not working at all doesn't do any animation

@IjzerenHein
Copy link
Owner

With introduction of the latest react-native version, some internals were changed which broke compatibility with react-native-shared-element. I've just published a pre-release (v0.9.0-rc0) as next to NPM which should fix the compatibility problem.
You can install it using yarn add react-native-shared-element@next (or whichenever package manager you are using)
Please let me know if that resolves the problem for you 🙏

You cannot use in expo sdk 52 SharedElements is not working at all doesn't do any animation

Are you using a dev-client or Expo Go?
Cause I have a Expo 52 example application (see example folder), and it's definitely working in there

@LegendProjects
Copy link

With introduction of the latest react-native version, some internals were changed which broke compatibility with react-native-shared-element. I've just published a pre-release (v0.9.0-rc0) as next to NPM which should fix the compatibility problem.
You can install it using yarn add react-native-shared-element@next (or whichenever package manager you are using)
Please let me know if that resolves the problem for you 🙏

You cannot use in expo sdk 52 SharedElements is not working at all doesn't do any animation

Are you using a dev-client or Expo Go? Cause I have a Expo 52 example application (see example folder), and it's definitely working in there

Expo Go I tried before

In Expo Go the new arch is enabled even if in app.json is false, so probably will not work as i recently discovered, but in dev-client probably will work, I will try with the example folder

@IjzerenHein
Copy link
Owner

Expo Go no longer contains react-native-shared-element, it was removed a while ago. See this comment in the README https://github.com/IjzerenHein/react-native-shared-element?tab=readme-ov-file#installation

You'll need to create a development-build
https://docs.expo.dev/develop/development-builds/create-a-build/

@pfcodes
Copy link

pfcodes commented Feb 6, 2025

Build failed: The "Run fastlane" step failed because of an error in the Xcode build process. We automatically detected following errors in your Xcode build logs:
- no member named 'topLeft' in 'RCTCornerRadii'
- no member named 'topRight' in 'RCTCornerRadii'
- no member named 'bottomLeft' in 'RCTCornerRadii'
- no member named 'bottomRight' in 'RCTCornerRadii'
- no member named 'topLeft' in 'RCTCornerRadii'
- no member named 'topLeft' in 'RCTCornerRadii'
- no member named 'topLeft' in 'RCTCornerRadii'
- no member named 'topRight' in 'RCTCornerRadii'
- no member named 'topRight' in 'RCTCornerRadii'
- no member named 'topRight' in 'RCTCornerRadii'
- no member named 'bottomLeft' in 'RCTCornerRadii'
- no member named 'bottomLeft' in 'RCTCornerRadii'
- no member named 'bottomLeft' in 'RCTCornerRadii'
- no member named 'bottomRight' in 'RCTCornerRadii'
- no member named 'bottomRight' in 'RCTCornerRadii'
- no member named 'bottomRight' in 'RCTCornerRadii'
Refer to "Xcode Logs" below for additional, more detailed logs.

I get this build error after upgrading to expo 52 development build

@oscarguinane
Copy link

Temporary fix: #128

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants