DEV Community

Cover image for How To Generate apk Using React Native Expo

How To Generate apk Using React Native Expo

Chinmay Mhatre on August 06, 2021

Introduction Hey everyone! Here is a quick article on how to generate an apk for your react native expo app. Install expo ...
Collapse
 
aryaweb profile image
Arya Shreyas

Thanks man! Easy and simple.

Collapse
 
amahuika profile image
amahuika

Hey, Great post thanks for sharing!.

Collapse
 
mrjeanmichell profile image
Jean Michell

Loved it! thank you.

Collapse
 
irtaza_ahmad_5ee3392c5c8b profile image
Irtaza Ahmad

To generate an APK using React Native Expo, follow these simple steps. It's a straightforward process that I also used to create my Wegocup site, which offers free APK downloads.

Steps to Generate APK Using Expo:

  1. Install Expo CLI Make sure you have Expo CLI installed by running the command:
   npm install -g expo-cli
Enter fullscreen mode Exit fullscreen mode
  1. Initialize Your Project Create a new React Native project using Expo:
   expo init your-project-name
Enter fullscreen mode Exit fullscreen mode
  1. Configure app.json
    Update the app.json file with your app details, including the app name, version, and Android-specific configurations.

  2. Build Your App
    Run the following command to build the APK:

    bash
    eas build -p android
    This requires the Expo Application Services (EAS). If it's your first time, follow the prompts to configure your project.

  3. Login and Publish
    Log in to your Expo account and publish the build. Expo will generate a URL for downloading your APK.

  4. Download the APK

    Once the build is complete, download your APK from the provided link.

Why I Chose React Native Expo for Wegocup:
Expo simplifies the app development process by providing tools and libraries that eliminate the need for extensive native configurations. For my Wegocup site, it allowed me to quickly create an app that supports a seamless APK download experience while keeping the app lightweight and efficient.

With Expo, generating an APK is quick, efficient, and beginner-friendly perfect for projects like Wegocup or any other app idea you have in mind!

Collapse
 
chris_levis_d1e25f4e33755 profile image
Chris Levis

"Generating an APK with React Native Expo is pretty straightforward if you use the expo build:android command, but remember to switch to EAS Build for better customization. Speaking of custom apps, have you come across Bad Parenting Mr. Red Face? It's a creative game APK that showcases how unique app development can lead to an engaging user experience!"

Collapse
 
herry_jack_65a60c2e4b6915 profile image
Herry jack

To generate the Sky Club APK, start by accessing reliable tools and platforms designed for APK development. Ensure you have the necessary software and follow best practices to create a secure and optimized application. Focus on maintaining a user-friendly interface and seamless functionality to provide the best experience. Once the APK is ready, test it thoroughly to ensure quality and performance. With the right approach, you can create a remarkable Sky Club APK that captivates users and delivers exceptional entertainment!

Collapse
 
irtaza_ahmad_5ee3392c5c8b profile image
Irtaza Ahmad

Generating an APK using "React Native Expo" is simple, and it's a great way to create apps like Sportzfy APK. Here’s how you can do it:

  1. Install Expo CLI Run the command:
   npm install -g expo-cli
Enter fullscreen mode Exit fullscreen mode
  1. Start Your Project Create a new project:
   expo init your-project-name
Enter fullscreen mode Exit fullscreen mode
  1. Build the APK Use Expo Application Services (EAS) to build the APK:
   eas build -p android
Enter fullscreen mode Exit fullscreen mode
  1. Download Your APK Once the build is done, download your APK from the Expo dashboard.

Using React Native Expo makes app development easy and efficient. It’s one of the reasons Sportzfy Cricket APK delivers such a smooth and user-friendly experience for cricket lovers worldwide. If you’re creating a sports app or any APK, this is a great tool to use.

Collapse
 
dipeshsah profile image
Dipesh Kumar Sah
Comment hidden by post author
Collapse
 
chinmaymhatre profile image
Chinmay Mhatre

Updated the blog for the new method

Collapse
 
ahmadnoor4050 profile image
AhmadNoor4050

Using EXPO 45 butt know 47verion how to create APK.

Collapse
 
chinmaymhatre profile image
Chinmay Mhatre

I believe this methods works with version 47

Collapse
 
mehdinoori5233 profile image
MehdiNoori5233
Comment hidden by post author
Collapse
 
chinmaymhatre profile image
Chinmay Mhatre

Hey,
Expo sdk recently had an update. A new cli has been put in place to build apks. you can take a look at this : expo.dev/eas

Collapse
 
azharuddin1801734 profile image
azharuddin1801734

i am facing this issues or errors during follow these steps for generate apk using expo
can anyone help me for solve these problems during generate apk using expo in react native project

Running 'gradlew :app:assembleRelease' in /home/expo/workingdir/build/android

Downloading services.gradle.org/distributions/...

10%

20%.

30%.

40%.

50%.

60%.

70%.

80%.

90%.

100%

Welcome to Gradle 7.5.1!

Here are the highlights of this release:

  • Support for Java 18

  • Support for building with Groovy 4

  • Much more responsive continuous builds

  • Improved diagnostics for dependency resolution

For more details see docs.gradle.org/7.5.1/release-note...

To honour the JVM settings for this build a single-use Daemon process will be forked. See docs.gradle.org/7.5.1/userguide/gr....

Daemon will be stopped at the end of the build

[stderr]
FAILURE: Build failed with an exception.

[stderr]

  • Where:

[stderr]
Script '/home/expo/workingdir/build/node_modules/@react-native-community/cli-platform-android/native_modules.gradle' line: 250

[stderr]

  • What went wrong:

[stderr]
A problem occurred evaluating script.

[stderr]

[stderr]
Calling [node, /home/expo/workingdir/build/node_modules/@react-native-community/cli/build/bin.js, config] finished with an exception. Error message: groovy.json.JsonException: Unable to determine the current character, it is not a string, number, array, or object

[stderr]

[stderr]
The current character read is 'E' with an int value of 69

[stderr]
Unable to determine the current character, it is not a string, number, array, or object

[stderr]
line number 1

[stderr]
index number 0

[stderr]
Error: Package name not found in /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml at Object.projectConfig (/home/expo/workingdir/build/node_modules/@react-native-community/cli-platform-android/build/config/index.js:74:11) at Object.get project as project at filterConfig (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/commands/config/config.js:13:20) at Object.func (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/commands/config/config.js:27:32) at Command.handleAction (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/index.js:192:23) at Command.listener (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/commander/index.js:315:8) at Command.emit (node:events:513:28) at Command.parseArgs (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/commander/index.js:651:12) at Command.parse (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/commander/index.js:474:21) at setupAndRun (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/index.js:271:24)info Run CLI with --verbose flag for more details.

[stderr]
^. Output: Error: Package name not found in /home/expo/workingdir/build/android/app/src/main/AndroidManifest.xml at Object.projectConfig (/home/expo/workingdir/build/node_modules/@react-native-community/cli-platform-android/build/config/index.js:74:11) at Object.get project as project at filterConfig (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/commands/config/config.js:13:20) at Object.func (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/commands/config/config.js:27:32) at Command.handleAction (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/index.js:192:23) at Command.listener (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/commander/index.js:315:8) at Command.emit (node:events:513:28) at Command.parseArgs (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/commander/index.js:651:12) at Command.parse (/home/expo/workingdir/build/node_modules/@react-native-community/cli/node_modules/commander/index.js:474:21) at setupAndRun (/home/expo/workingdir/build/node_modules/@react-native-community/cli/build/index.js:271:24)info Run CLI with --verbose flag for more details.

[stderr]

  • Try:

[stderr]

Run with --stacktrace option to get the stack trace.

[stderr]

Run with --info or --debug option to get more log output.

[stderr]

Run with --scan to get full insights.

[stderr]

[stderr]
BUILD FAILED in 18s

Error: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.

please provide me solutions of these errors

Image description

Collapse
 
anujawas profile image
Anuj Awasthi

I am Calling an Inside my expo App which is being successfully implemented, But same is not being called in APK. Can you help me with that?

Collapse
 
ashwith25 profile image
Ashwith Poojary

Very well explained! 🙌

Collapse
 
raushankp75 profile image
Raushan Kumar

After build apk it will not run on Android when i install on Android device and open it will show keeps stopping. Please help me what is the issue and how can i solve this issue anyone can help please... I am frustrating about 2 day's and not able to find the solution..
Image description

Collapse
 
awais882s profile image
Muhammad Awais

Thank You Brother

Collapse
 
rubainriyam profile image
RubainRiyam

Very Usefull

Collapse
 
fadel_ellah_errami profile image
Fadel Ellah ERRAMI

great post mr @chinmay Mhatre

Collapse
 
shakerscode profile image
Shaker Ahamed

I did the same. But I don't know why, Clerk auth doesn't work. Do you know why? any idea?

Collapse
 
barrytestfl profile image
Barry

i followed this steps but get this error:

✖ Uploading to EAS Build (1.8 MB / 1.8 MB)
Error: Request failed: 403 (Forbidden)

Collapse
 
anabeatrizzz profile image
Ana Beatriz

I just can download the .aab file

Collapse
 
chinmaymhatre profile image
Chinmay Mhatre

Updated the blog on how to download the apk

Collapse
 
happycamper1129 profile image
happycamper1129

Hi, Nice to meet you.
Can you help me?
I want to build to .aab file in expo.

If you have any solution, please let me know.

Regards.

Collapse
 
chinmaymhatre profile image
Chinmay Mhatre

I believe you could change the build type to aab or just run eas build. By default the file type is .aab

Collapse
 
retumishra22 profile image
Retumishra22

Thank you for the blog. Very helpful. 👏👏

Collapse
 
jatinbisht2308 profile image
Jatin_Bisht

Thank you so much sir.

Collapse
 
satyam_kumar_fb0f6e31f4ce profile image
satyam kumar

as I am beginer It's great help.

Collapse
 
shakilkhansau profile image
Md. Shakil Khan

File size is so big . how to optimize it?

Collapse
 
huumanh profile image
Doan Huu Manh

Thanks you! Love it.

Collapse
 
daniel_anoka_fd55dc1ef951 profile image
Daniel Anoka

how about for ios

Collapse
 
ghulamhussainsoftware profile image
GhulamHussainJoyo

very helpful thanks.
I read in expo documentation is that we can only make 30 builds free using ease build. is anyone guide me regarding?

Collapse
 
tonnykizito profile image
KIZITO TONNY

After building apk, when I try to download the apk, I get an error "page is unreachable", what should I do please

Collapse
 
zanwhip profile image
NguyenVanHung

After completing the steps to build the apk file as you instructed. I have downloaded the file to my phone. But when I try to open it it fails. When pressed to open it will return to the main screen

Collapse
 
raushankp75 profile image
Raushan Kumar

How can you solve this issue? Same issue with me....
Image description

Some comments have been hidden by the post's author - find out more