Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to build APK for Android intended for internal distribution?

I'm working on an Android app with React Native.

For testing and developing I just follow the regular dev workflow with a server on my dev machine, reload JS, etc.

Now I want to pass the APK to other people in my company so that they can test the app on their device.

I've been looking into the android folder on my React Native project but I can't find an APK ready to send to other people. It seems the only APK was built when I created the project a few weeks ago, and I'm assuming this APK does not contain any JS code.

I've found these instructions for building a signed app for the Play Store, but I don't need to distribute this APK on the Play Store.

So, how do I create a self contained APK with the JS files and assets that I can easily pass to other people for testing?

like image 424
Pier Avatar asked May 31 '16 18:05

Pier


People also ask

How do I distribute my Android app?

Distributing your apps by email To do this, you prepare the app for release, attach it to an email, and send it to a user. When the user opens your email on their Android-powered device, the Android system recognizes the APK and displays an Install Now button in the email message.

How do I distribute an app without Play store?

If you don't want to release your app on a marketplace such as Google Play, you can make it available for direct download to your users (sideloading). Export the APK file of your application and provide users with the download link.

What is APK distribution?

APK stands for Android Package (sometimes Android Package Kit or Android Application Package). It's the file format that Android uses to distribute and install apps. As a result, an APK contains all the elements that an app needs to install correctly on your device.


1 Answers

From the link you already had in the question, you can skip over the signing details, and just go to "Generating the release APK"

Simply run the following in a terminal:

$ cd android && ./gradlew assembleRelease

Gradle's assembleRelease will bundle all the JavaScript needed to run your app into the APK.

...

The generated APK can be found under android/app/build/outputs/apk/app-release.apk, and is ready to be distributed.

like image 187
OneCricketeer Avatar answered Oct 18 '22 01:10

OneCricketeer