IjzerenHein / IjzerenHein/react-native-shared-element

React Native Shared Element is incompatible with expo@52

Open
#127 9 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

repro provided
Dominant language
TypeScript
Stars
2.3k
Forks
113
PR merge metrics
No merged PRs in 30d

Description

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
```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with android/src/main/java/com/ijzerenhein/sharedelement/RNSharedElementDrawable.java, especially the setBorderColor call around line 314, and compare it with the CSSBackgroundDrawable API used by expo@52. Confirm the Android build no longer fails at compileDebugJavaWithJavac while preserving the shared-element behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, react-native
Domain
mobile
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.