transitions is throwing error in react-native 0.60.5
@kmagiera
Same here
@robonaut quick fix for this issue,
//need to remove once library updates to androidx
preBuild.doFirst {
ant.replaceregexp(match: 'android.support.annotation.NonNull;', replace: 'androidx.annotation.NonNull;', flags: 'g', byline: true)
{
fileset(dir: '../../node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/transitions/', includes: '*.java')
}
ant.replaceregexp(match: 'android.support.annotation.Nullable;', replace: 'androidx.annotation.Nullable;', flags: 'g', byline: true)
{
fileset(dir: '../../node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/transitions/', includes: '*.java')
}
ant.replaceregexp(match: 'android.support.transition', replace: 'androidx.transition', flags: 'g', byline: true)
{
fileset(dir: '../../node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/transitions/', includes: '*.java')
}
}
Add this before dependencies in android/app/build.gradle
thanks, you saved hours of my life @ashrithks !
I had error in my app (just to let other people know how to fix that)
.../node_modules/react-native-reanimated/android/src/main/java/com/swmansion/reanimated/transitions/TransitionModule.java:3: error: package android.support.transition does not exist
import android.support.transition.TransitionManager;
@denieler +1
@denieler +1锛泃his problem is 'package android.support.transition does not exist'. @kmagiera
reanimated/transitions/TransitionModule.java:3: error: package androidx.transition does not exist
import androidx.transition.TransitionManager;
^
Used jetify to patch to androidx. But is there any additional libs to be added to gradle?
Created a PR https://github.com/kmagiera/react-native-reanimated/pull/395.
Workaround: run npx jetify every time you install/update/remove NPM package.
Created a PR #395.
Workaround: run npx jetify every time you install/update/remove NPM package.
amazing workaround 馃憤 ...
Closing this as of #395
I got a solution
Upgrade react-native-reanimated to ^1.5.0 without touching any part of your android config
I got a solution
Upgrade react-native-reanimated to ^1.5.0 without touching any part of your android config
Works like a charm. Thank you.
Most helpful comment
@robonaut quick fix for this issue,
Add this before dependencies in android/app/build.gradle