Building an Android APK with React Native Expo | Tutorial EAS Build

Поделиться
HTML-код
  • Опубликовано: 16 окт 2024
  • Join us in this tutorial as we create an APK for Android.
    React Native Course 👉🏼 codewithbeto.d...
    For resources go to Code With Beto 👉🏼 codewithbeto.dev
    My new channel 👉🏼 / @codewithbeto1
    Join the Discord: / discord
    👨🏻‍💻 ☕️ 🌟 Would you like to support me? Sponsor me on GitHub🌟 ☕️ 👨🏻‍💻
    github.com/bet...
    ⭐️ If you want to learn more about me, check this links:
    Twitter: / betomoedano
    Instagram: / betomoedano. .
    Github: github.com/bet...
    Linkedin: / betomoedano
    Discord: / discord
    Code With Beto: codewithbeto.ve...
    Medium: / betomoedano01
    Figma: www.figma.com/...
    My channel in Spanish: / betomoedano
    ⭐️ My apps & projects:
    ► Code With Beto: codewithbeto.v...
    ► Eco Studios: ecodev.netlify...
    ⭐️ Contact: betomoedano@outlook.com

Комментарии • 117

  • @aryanbarnwal5645
    @aryanbarnwal5645 6 месяцев назад +1

    can you please tell me if the APK file will run on my Android phone?

  • @lucasdossantosgomes8312
    @lucasdossantosgomes8312 Год назад +10

    Build failed: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information.
    how to resolve this problem?

    • @my_extreme_code
      @my_extreme_code Год назад +6

      When encountering a Gradle build failure with an unknown error, it can be challenging to pinpoint the exact cause without additional information or error logs. However, here are some general troubleshooting steps you can follow to resolve the issue:
      Check the error logs: Look for the specific error message or stack trace provided in the logs for the "Run gradlew" phase. The logs can usually be found in the console output or in a separate log file. Understanding the specific error message can help you identify the root cause of the problem.
      Verify Gradle version: Ensure that you are using a compatible Gradle version for your project. Check the Gradle documentation or the project's documentation to determine the recommended Gradle version. You can also try updating Gradle to a newer version if you are using an outdated one.
      Check for dependency conflicts: Gradle builds can fail due to conflicts between different dependencies. Use the dependency management features of Gradle to analyze and resolve any conflicts. You can try excluding or updating specific dependencies to resolve conflicts.
      Clean and rebuild: Sometimes, build failures can be caused by corrupt or outdated build artifacts. Try cleaning the project build by running gradlew clean or ./gradlew clean (depending on your operating system) before attempting to rebuild. This will remove any previously generated build files and start with a clean slate.
      Internet connectivity: Gradle relies on internet connectivity to download dependencies and plugins. Ensure that you have a stable internet connection and that any necessary proxies or firewalls are properly configured.
      Check for build script errors: Review your Gradle build scripts (build.gradle or build.gradle.kts) for any syntax errors or misconfigurations. Pay attention to the tasks, dependencies, and plugins specified in the build scripts.
      Gradle wrapper: If you are using the Gradle wrapper (gradlew or gradlew.bat), make sure it is properly configured and up to date. You can try updating the Gradle wrapper by running gradlew wrapper --gradle-version X.Y.Z (replace X.Y.Z with the desired Gradle version).
      Seek help: If you have tried the above steps and the issue persists, consider seeking help from the Gradle community or the specific project's support channels. They may be able to provide more targeted guidance based on the error logs or project-specific configuration.
      Remember to provide as much relevant information as possible when seeking assistance, such as the error message, relevant portions of the build script, and any additional context that might be helpful in diagnosing the problem.

  • @danielsalazar6557
    @danielsalazar6557 3 месяца назад +1

    Im having problems with asynstorage in the Apk when I install the file in my Android phone, for some reason the the asynstorage doesn't save any value, Did anyone have the same problem?

  • @Krystian-i1o
    @Krystian-i1o 11 месяцев назад +4

    if it is crush after lounch then remove node modules and package-lock install packages using yarn and then during build check errors and in my case it was about add package react-native-screens

    • @testing0911
      @testing0911 10 месяцев назад

      thanks buddy really needed this

    • @itznishantu
      @itznishantu Месяц назад

      Big Big thank you man . I really appreciate your comment . My app crashes after lunch but after deleting the node_module,packgae-lock and reinstalling them with the yarn solve the crashing problem. But while using yarn i have to install the missing packages manually and this is somthing annoying to me. But anyways thank you --> user-dm2kl7dw2h

  • @KuldeepSahu-e9s
    @KuldeepSahu-e9s Год назад +2

    I am getting error android build failed can you please resolve it ?

  • @victorhugotiradopenaranda3149
    @victorhugotiradopenaranda3149 Год назад +1

    Linking local project to EAS project d7fc23b1-48ad-47da-a3ae-xxxxx3f7xxxx
    No config exists
    Error: build:configure command failed.

  • @Daniel-vc2nz
    @Daniel-vc2nz 3 месяца назад

    i couldn't explore more on the eas.json file and was not able to edit on it just like what you're doing on your screen but my eas build was successfully created for all device .what can i do ?

  • @OfirGormes-y2v
    @OfirGormes-y2v 11 месяцев назад +1

    Thanks for the useful video!
    Can you share how did you changed the app icon? I can't seem to change it no matter what I try.
    I changed it in the app.json file and ran eas update but the icon doesnt change.
    Help please🙏

  • @asmaakhaled9951
    @asmaakhaled9951 Год назад

    I have a problem that the apk after build, and install it, the app crashed, it is open and close in the same moment, what is the problem?

  • @SonuSinghmirzapur
    @SonuSinghmirzapur Год назад +1

    Compressing project files :- failed to upload the project tarball to eas build.
    Reason :- cannot copy 'C:\Users\***' to a subdirectory of itself,
    Help ?

    • @satyamtripathi799
      @satyamtripathi799 3 месяца назад

      hi facing same issue
      can u let me know how u resolved it ?

  • @pierremutamba5272
    @pierremutamba5272 Год назад

    Hi, I can't create an account when I create it, I get an error message, can you help me, thank you for your answer. Peter

  • @patriciodiaz4483
    @patriciodiaz4483 8 месяцев назад +1

    Hi! I have a question, how you configure the environment variables for development and production? I read the documentation and it says you have to pass them in thw eas.json file, but when I do it and build my preview android apk, it doesn't works

    • @sfallpeoplefaiz4473
      @sfallpeoplefaiz4473 7 месяцев назад

      show me ur eas.json code

    • @wendigo6372
      @wendigo6372 3 месяца назад

      Did you solve it?

    • @patriciodiaz4483
      @patriciodiaz4483 3 месяца назад

      @@wendigo6372 yes I figured it out, I was able to set 3 environments, in my case development, preview and production. Also I found a way to change the App name depending of this one

    • @patriciodiaz4483
      @patriciodiaz4483 3 месяца назад

      {
      "cli": {
      "version": ">= 6.0.0"
      },
      "build": {
      "development": {
      "developmentClient": true,
      "distribution": "internal",
      "env": {
      "EXPO_PUBLIC_API_EXAMPLE": "",
      "EXPO_PUBLIC_API_EXAMPLE_2": ""
      },
      "android": {
      "buildType": "apk"
      }
      },
      "preview": {
      "distribution": "internal",
      "android": {
      "buildType": "apk"
      },
      "env": {
      "EXPO_PUBLIC_API_EXAMPLE": "",
      "EXPO_PUBLIC_API_EXAMPLE_2": "",
      "APP_VARIANT": "preview"
      }
      },
      "production": {
      "env": {
      "EXPO_PUBLIC_API_EXAMPLE": "",
      "EXPO_PUBLIC_API_NODO_EXAMPLE_2": ""
      },
      "android": {
      "buildType": "apk"
      }
      }
      },
      "submit": {
      "production": {}
      }
      }

    • @patriciodiaz4483
      @patriciodiaz4483 3 месяца назад

      That is the structure I use for eas.json. The important thing to set the correct prefix variable in env object, is a must to type the EXPO_PUBLIC_API_ . Another thing is the APP_VARIANT, is optional, but this will help you as a environment variable to be able to change some dynamic values (in my case de name of the app), I will comment an example

  • @sp-ef2fi
    @sp-ef2fi Год назад +1

    So in Windows using EAS we can only target android simulator but not iOS?
    Then what is the benefit of using Expo over react native cli?

    • @codewithbeto
      @codewithbeto  Год назад

      Yes you can target android, this tutorial is just for android

  • @laurenceparcon5147
    @laurenceparcon5147 Год назад

    "You have reached the concurrency limit. Build is waiting to enter the queue. "hello what is this error sir?

    • @Krystian-i1o
      @Krystian-i1o 11 месяцев назад

      you have to wait more for your build because another are in the queue

  • @anillimbu7092
    @anillimbu7092 Год назад

    When i run this command in my terminal eas build:configure it says zsh: command not found: eas, how to fix it ?

    • @codewithbeto
      @codewithbeto  Год назад

      You need to install the expo CLI, refer to the expo documentation for instructions 👍

  • @pramudnadula9690
    @pramudnadula9690 Год назад

    can you tell me what is the name of android simulator and where can i download

  • @JuneBeforeJuly
    @JuneBeforeJuly Год назад

    am i doing th enpm install in my project folder or do i do it through git?

  • @elvinmucaj9664
    @elvinmucaj9664 Год назад

    did you try to install into a android device? because I tried and comes with an error and I have to specify that I'm using windows OS

    • @arpanbajpai1226
      @arpanbajpai1226 Год назад +1

      Did your app crashes as soon as you open your apk? And how to fix it.Plz help bro

    • @emirozdemir9060
      @emirozdemir9060 Год назад +1

      @@arpanbajpai1226 I have the same issue... Did you find a solution?

    • @hudsonmenezesdev
      @hudsonmenezesdev Год назад

      @@emirozdemir9060 any of you found a solution?

    • @tungac
      @tungac Год назад

      my app crashing too when i start@@arpanbajpai1226

  • @conceptualdeveloper
    @conceptualdeveloper Год назад

    IS it Debug apk? if yes then is it possible throught create-react-native-app?

  • @Herowindows
    @Herowindows 11 месяцев назад

    apk crash everytime while open , what's the solution ??

  • @Lobos91
    @Lobos91 Год назад

    There is 30 free builds a month in free plan, does it mean i can only run my app 30 times in visual code? That would be insane if there is 5 people working on app amd we daily open amd run it like 50 times

    • @awaisDeshmukh
      @awaisDeshmukh Год назад +4

      As I understand it, it is not about running the app in Visual Studio Code, but rather about building it, which means that one can build the Android app up to 30 times and the iOS app up to 15 times. Trust me, I've run my own expo app more than 500 times in a month with Visual Studio Code. In other words, it's not about running an app, but about building an apk. I hope my response was helpful.

  • @EdikTVSet
    @EdikTVSet Год назад

    My app works via Metro but it crashes after splash screen when I try to launch it via apk. 😭

    • @arpanbajpai1226
      @arpanbajpai1226 Год назад

      Is your problem resolved?plz help me.

    • @EdikTVSet
      @EdikTVSet Год назад +1

      @arpanbajpai1226 yep yep. I figured it out via creating a new project. In the new project I realized that I made some mistakes in previous project. For example, my way of installing packages was wrong. I used to installing packages using "npm install" but the right way is "npx expo install nameOfPackageYouWannaInstall"
      It was the main problem. Also, there were other problems with layout. I had some red errors but it worked via Metro. But unfortunately it doesn't work via apk. Make sure your project doesn't have errors.

    • @arpanbajpai1226
      @arpanbajpai1226 Год назад

      @@EdikTVSet My project is almost error free.I am able to build and install the apk file in my physical android but as soon as i open it,it crashes and takes it to the Android interface.I dont know how to fix it.

    • @EdikTVSet
      @EdikTVSet Год назад

      @arpanbajpai1226 try to create a new empty project. Then build it. Does it work? If so, great. Start adding new content step-by-step, build and test project. This way you will find the problem cuz one time you will get a wrong build. And you will know the reason why

    • @arpanbajpai1226
      @arpanbajpai1226 Год назад

      @@EdikTVSet Ok bro I wanna this method may be it will work.Thnx

  • @michaellevi1474
    @michaellevi1474 Год назад

    So, how do you pass the point with the node version problem? It seems like there's nothing I can do. It's literally the first problem, yet I can't seem to find a solution. How did you solve this?

    • @codewithbeto
      @codewithbeto  Год назад

      Can you provide more context to this problem? I’m not sure what error you are referring

    • @michaellevi1474
      @michaellevi1474 Год назад

      @@codewithbeto Sure. Expo doesn't support the LSV of Node, but not even the latest version, but the last 3 versions. I believe Node v16 and below are supported by Expo. Has something to do with Node using different hashing for security, I dunno. So my question is, is there a way around it? Or is the only way to downgrade node to version that supports Expo?

    • @codewithbeto
      @codewithbeto  Год назад +1

      It should work with node 18 but you can try using a node version manager like nvm to quickly change between node versions in your computer. I hope this helps

  • @sujanjoshi8151
    @sujanjoshi8151 Год назад

    I get error with: Linking local project to EAS project

  • @arpanbajpai1226
    @arpanbajpai1226 Год назад

    Bro when i launch apk through my android phone it crashes and doesnt open what to do?

  • @javiersistemas
    @javiersistemas Год назад +5

    Better English than some guys, Beto ... congrats 😀👍
    By the way, can you explain how to run and configure that Emulator on the right side on the screen, man. Thanks in advance 😀👍

    • @codewithbeto
      @codewithbeto  Год назад +1

      Thanks bro! Do you mean the IOS simulator? You just need to download Xcode 👍👍

    • @javiersistemas
      @javiersistemas Год назад

      @@codewithbeto OK... in MacOS but in Windows is it possible? 🤔 I guess so. Thanks for your answer, my man 😀👍

    • @codewithbeto
      @codewithbeto  Год назад +1

      @@javiersistemas is not possible on windows

    • @javiersistemas
      @javiersistemas Год назад

      @@codewithbeto ohhh boy 😨😨😨 ... that's so sad 😞 ... Anyway, thanks for your time, man and I'll keep supporting you, brother 😃😃

    • @codewithbeto
      @codewithbeto  Год назад +1

      @@javiersistemas thanks Javier I appreciate you

  • @amanikafonogo9695
    @amanikafonogo9695 7 месяцев назад

    I am getting eas not recognize command

  • @k1ll3trs86
    @k1ll3trs86 5 месяцев назад

    That doesn't work anymore

  • @ikerenson
    @ikerenson 7 месяцев назад

    what about on windows?

  • @micahenoch7333
    @micahenoch7333 Месяц назад

    please how can i add env file

  • @أميرالمؤمنينبنمحمدأكرم

    why the apk 60mb for only hello world

    • @shahbazimma
      @shahbazimma Месяц назад

      me to facing with same issue

    • @أميرالمؤمنينبنمحمدأكرم
      @أميرالمؤمنينبنمحمدأكرم 24 дня назад

      @@shahbazimma now i understand, the size of the eas build is not the same as playstore build, in the playstore, it should be around 9-11 mb in the latest SDK

  • @echendukwe1510
    @echendukwe1510 Год назад

    i get an AAB file instead of an apk, any help?

    • @wisdomelue
      @wisdomelue Год назад

      add this to the "preview" object
      "android": {
      "buildType": "apk"
      }

  • @tonnykizito816
    @tonnykizito816 Год назад

    The link generated for downloading apk is unreachable

    • @codewithbeto
      @codewithbeto  Год назад

      Sometimes you just need to try again 😅

    • @tonnykizito816
      @tonnykizito816 Год назад

      Ok, but I tried several times but still failed. Thank you for replying me

  • @tonnykizito816
    @tonnykizito816 Год назад

    The link generated for downloadingi

  • @AnjanBoro-l4g
    @AnjanBoro-l4g 11 месяцев назад +1

    apk crash everytime while open

  • @Krystian-i1o
    @Krystian-i1o 11 месяцев назад

    how to build for ios?

  • @anantgupta5806
    @anantgupta5806 6 месяцев назад

    no worries for English bro, it's perfect

  • @johncmm9759
    @johncmm9759 Год назад

    Let us know if you publish the course in English! I'd buy in a heartbeat

    • @codewithbeto
      @codewithbeto  Год назад

      The course is almost entirely available in English now! You can see the progres here codewithbeto.dev/learn

  • @abishaa6691
    @abishaa6691 Год назад

    Thank you.🎉

  • @ItsMe-fj1co
    @ItsMe-fj1co Год назад +1

    ver helpful, tu ver much!

  • @neelsoni13062
    @neelsoni13062 10 месяцев назад

    Work this video😀😀😀😀

  • @bilelrahmouni01
    @bilelrahmouni01 Год назад

    thank you

  • @alimosbah
    @alimosbah Год назад +1

    English Bro English Plz Plz 😇😇😇😇😇😇😇

  • @OmSingh-ku5ms
    @OmSingh-ku5ms Год назад

    bro english courses are very important

  • @emmanuelolaosebikan8211
    @emmanuelolaosebikan8211 2 месяца назад

    English or Spanish 😂

  • @Rabeet_CodeLab
    @Rabeet_CodeLab Год назад +4

    When i install .apk file into android phone. it installs, but when i open it says 'app stops' and never start

    • @hudsonmenezesdev
      @hudsonmenezesdev Год назад

      Mine too, did you fix it? How?

    • @tungac
      @tungac Год назад

      how did you fix it?@@hudsonmenezesdev

    • @wisdomelue
      @wisdomelue Год назад

      ​@@hudsonmenezesdevhappened to me, I had to check the build logs to figure it out, might be dependency issues or even the images you are using for icon, adaptive-icon etc
      specifically check the "expo run doctor" part of the build logs and also "run gradle"

    • @keithlunatic2266
      @keithlunatic2266 10 месяцев назад +1

      It might be caused due to dependency issue, happened to me

    • @ТаалайбекУтуров
      @ТаалайбекУтуров 7 месяцев назад

      Did you fix it?

  • @Nibezak
    @Nibezak Год назад +1

    mine is telling me android bundle failed , run "grandlew " 😭😭😭 please help me I need this

  • @edcelguinto719
    @edcelguinto719 Год назад

    i tried to build the app but upon installing in on an android device the app is stuck on the splash screen.