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

support for androidx #374

Closed
ashrithks opened this issue Aug 23, 2019 · 11 comments
Closed

support for androidx #374

ashrithks opened this issue Aug 23, 2019 · 11 comments

Comments

@ashrithks
Copy link

ashrithks commented Aug 23, 2019

transitions is throwing error in react-native 0.60.5
@kmagiera

@robonaut
Copy link

Same here

@ashrithks
Copy link
Author

@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

@denieler
Copy link

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;

@nikhilborana
Copy link

@denieler +1

@GuoXianglin
Copy link

@denieler +1;this problem is 'package android.support.transition does not exist'. @kmagiera

@thevikas
Copy link

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?

@dulmandakh
Copy link
Contributor

Created a PR #395.

Workaround: run npx jetify every time you install/update/remove NPM package.

@denieler
Copy link

Created a PR #395.

Workaround: run npx jetify every time you install/update/remove NPM package.

amazing workaround 👍 ...

@kmagiera
Copy link
Member

Closing this as of #395

@mustapha-ghlissi
Copy link

I got a solution

Upgrade react-native-reanimated to ^1.5.0 without touching any part of your android config

@marcosjoao37
Copy link

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.

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

No branches or pull requests

10 participants