Expo build not opening in phone

Please provide the following:

  1. SDK Version: 42.0.0
  2. Platforms(Android/iOS/web/all): Android

I started an expo project bare mimimum project and it is working fine on local with simulator but as soon as i build the app with expo build:android and when i’m downloading the apk on my android device and try to run it it says can’t open file everytime.

Can anyone please help? @quinlanj @adamjnav

Your phone should prompt to open the APK with the “Package installer” app. You might need to configure your phone to “Allow unknown apps”, though.

If this does not allow you to install the app then you could try installing it by enabling USB debugging, plugging the phone in via a USB cable and then using adb -d install yourapp.apk

There are many articles about installing an APK using adb. Here is one example

@wodin i know those things and i have already turned on the Allow unknown apps options but whenever i click the apk file it only says can’t open file.

OK, so since there seems to be something weird happening on your phone when you try to open the APK file, did you try installing it with adb install?

EDIT: The other possibility is that the file was not downloaded correctly. Is it the size you expect it to be? (e.g. if you download it on your computer, is it the same size as the copy on your phone?)

@wodin i can’t try it with adb install. i have to build the apk and then distribute to other people who are not with me. So the apk should work on their phones. And yes the size are okay.
Even i created a very basic project with expo init and then build that same code without even doing any changes. It is not even working then. Any suggestions?

I understand you need to distribute it to other people. Have you found that other people cannot install it either?

Whether or not you need to distribute it to other people I think it’s still worth testing to see if you are able to install it on your phone using adb install. Also, I’m not sure how useful the following will be, but maybe try running adb logcat after trying to install the app the normal way and see if you can find any hints in the logcat output.

I have built apps many times using expo build:android and have been able to install them on my phone, so it seems like there’s something weird going on on your phone.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.