Check out a free preview of the full Intermediate React Native course

The "Build Android App" Lesson is part of the full, Intermediate React Native course featured in this preview video. Here's what you'd learn in this lesson:

Kadi demonstrates the steps necessary to start a React Native build for an Android application in Android Studio and discusses how Android dependencies are managed behind the scenes with Gradle. A walkthrough of how to configure a virtual device emulator in Android Studio is also provided in this segment.

Preview
Close

Transcript from the "Build Android App" Lesson

[00:00:00]
>> All right, let's build the Android app. So for Android development, we will use Android studio. So Android studio is the go to integrated development environment for Android. They actually also recently had a huge upgrade to arctic fox, which is this so they've changed the UI. So the UI now like when you launch it looks different.

[00:00:21]
But all you need to do is we go open. And we find where our project is, so mine is in projects mood tracker. And then similarly to what we did in IOS, just select the folder for Android and open it to then you don't need to worry about which file exactly to open.

[00:00:47]
All right, so just going to load your workspace. And notice that I spent quite a lot of time talking about pods for IOS, but I didn't talk about anything related that for Android. Well, it's because Android dependency management is done differently. It's kind of done behind the scenes, but by the build tool.

[00:01:04]
So Android uses gradle for dependency management. And if you look at the bottom right corner here, you can see what would the editors doing. So when you load the editor, it's like configuring plugins, making sure your project is up to date. And then when I build it, it actually downloads the missing plugins and builds the app.

[00:01:28]
So for Android, we're going to use an emulator. So emulators you can configure within Android studio. So if you click on ADD manager, which is this little phone with the Android face on it, and you can choose, if you haven't got a virtual device already, you can choose create virtual device.

[00:01:47]
And you can choose the device. Usually I would choose like the latest operating system. But obviously if you test other operating systems like older versions, you can create a device specific for that. Personally, I actually mostly do my Android development on a physical device. So I have an Android phone that I use for testing.

[00:02:07]
And I plug it in and I find it more convenient than using the emulators on a Mac. But in this case, just because I want a screen share, I'm going to use a virtual device. So I'm going to use the pixel five, so I'm gonna launch it. Okay.

[00:02:31]
Looks like greater list and all these things. So I'm going to choose pixel five from this list of devices. If you had your own Android device plugged in, it should appear here on the list and you can choose that instead. I'm gonna run the app. So this will take a little while to build as well.

[00:02:51]
So now we have both our IOS app and our Android app. I will be looking more into xcode and Android studio later on when we restore native dependencies. For now, we let's move on to the next section.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now