Home » Android » Android Core » Migrating React Native App to AndroidX

About Arpit Aggarwal

Arpit Aggarwal
Arpit is a Consultant at Xebia India. He has been designing and building J2EE applications since more than 6 years. He is fond of Object Oriented and lover of Functional programming. You can read more of his writings at aggarwalarpit.wordpress.com

Migrating React Native App to AndroidX

In this post, we will learn to migrate React Native application to AndroidX. Before starting, let me give you a brief introduction about Jetpack.

What is Android Jetpack?

Android Jetpack is the next generation of Android components, bringing together the benefits of the Support Library – backwards compatibility and immediate updates to a larger set of components, making it quick and easy to build robust, high quality apps. Android Jetpack manages activities like background tasks, navigation, and lifecycle management, so you can eliminate boilerplate code and focus on what makes your app great.

To start with the migration, firstly, edit gradle.properties of React Native application to add the following lines:

1
2
android.useAndroidX=true
android.enableJetifier=true

Next, Install jetifier package executing following command:

1
$ npm install --save-dev jetifier

Call npx jetify to migrate all node_modules to AndroidX, as follows:

1
$ npx jetify

And finally run your application using npx:

1
npx react-native run-android

Published on Java Code Geeks with permission by Arpit Aggarwal, partner at our JCG program. See the original article here: Migrating React Native App to AndroidX

Opinions expressed by Java Code Geeks contributors are their own.

(0 rating, 0 votes)
You need to be a registered member to rate this.
Start the discussion Views Tweet it!
Do you want to know how to develop your skillset to become a Java Rockstar?
Subscribe to our newsletter to start Rocking right now!
To get you started we give you our best selling eBooks for FREE!
1. JPA Mini Book
2. JVM Troubleshooting Guide
3. JUnit Tutorial for Unit Testing
4. Java Annotations Tutorial
5. Java Interview Questions
6. Spring Interview Questions
7. Android UI Design
and many more ....
I agree to the Terms and Privacy Policy

Leave a Reply

avatar

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
Notify of