Can't seem to generate an .apk file (Build Standalone App)

#1

I am trying to generate an APK file for my app and am following the steps provided here:

https://docs.expo.io/versions/v16.0.0/guides/building-standalone-apps.html

At the step where it says run exp start and then exp build:android once the app has started, nothing seems to actually happen when I run exp build:android. So I stopped that and tried to run exp build:android itself and it starts the project and builds the JavaScript bundle and then spits out this error:

[exp] Failed building JavaScript bundle.
[exp] Packager url http://localhost:19001/main.bundle?dev=false&minify=true&hot=false&assetPlugin=expo/tools/hashAssetFiles&platform=ios returned unexpected code 500. Please open your project in the Expo app and see if there are any errors. Also scroll up and make sure there were no errors or warnings when opening your project.

I just update the XDE to 2.18.0 today, but I can still run the app properly through there so I know that the JS bundle works. For some reason it just doesn’t seem to allow me to actually build the app to generate an APK file. Can anyone help with this?

0 Likes

#2

Every time I try to run “exp build:android” this always happens. It even says “Building iOS bundle” which doesn’t make much sense:

0 Likes

#3

hi brady-

was your app working during development? can you upload a zip or a github link to your project? it will be easier to debug that way.

cdc

0 Likes

#5

hi-

i just loaded your project and ran it through publishing with XDE on my computer and using my iphone.
i think maybe if you just try everything again from the beginning it might work?

@dikaiosune - do you know if there might be any known issue with the shell app builder for android that could be causing a problem here?

0 Likes

#6

You might try just rm -rf node_modules and then yarn and see if that fixes things.
Sometimes node_modules can get into a bad state.
That’s the only thing I can come up with right now since publishing is working fine for me with your code.

0 Likes

#7

This seemed to work, however I changed my code to update to Expo 17 when I retried this and I kept getting some sort of error with “Entypo” whenever I tried to run the app through the packager. So I just reverted back to Expo 16, reinstalled node_modules, and it seemed to build the APK properly.

0 Likes

#8

I am having this issue as well. I tried removing my node_modules and reinstalling, but I’m still getting

[exp] Failed building JavaScript bundle.
[exp] Error: Uncaught error in the transformer worker: /Users/tysoncadenhead/Sites/apps/VoiceChoice/node_modules/react-native/packager/transformer
[exp]     at _transform.then.catch.error (/Users/tysoncadenhead/Sites/apps/VoiceChoice/node_modules/react-native/packager/src/JSTransformer/index.js:124:33)
[exp]     at process._tickCallback (internal/process/next_tick.js:103:7)
[exp] react-packager has encountered an internal error, please check your terminal error output for more details
[exp] Packager url http://localhost:19001/./node_modules/react-native-scripts/build/bin/crna-entry.bundle?dev=false&minify=true&hot=false&assetPlugin=expo/tools/hashAssetFiles&platform=ios returned unexpected code 500. Please open your project in the Expo app and see if there are any errors. Also scroll up and make sure there were no errors or warnings when opening your project.

My app works in development without errors, but I am getting this error consistently when I do exp publish or exp build:ios

Here is my package.json:

{
  "name": "voice-choice",
  "version": "0.0.0",
  "private": true,
  "main": "node_modules/expo/AppEntry.js",
  "dependencies": {
    "expo": "^18.0.4",
    "firebase": "^4.1.3",
    "ramda": "^0.24.1",
    "react": "16.0.0-alpha.12",
    "react-functional-lifecycle": "^2.0.2",
    "react-native": "https://github.com/expo/react-native/archive/sdk-18.0.1.tar.gz",
    "react-native-loading-spinner-overlay": "^0.5.0",
    "react-navigation": "^1.0.0-beta.11",
    "react-primitives": "^0.4.2",
    "react-redux": "^5.0.5",
    "recompose": "^0.23.5",
    "redux": "^3.6.0",
    "redux-devtools-extension": "^2.13.2"
  }
}

and here is my app.json:

{
  "expo": {
    "privacy": "unlisted",
    "name": "voice-choice",
    "icon": "./assets/images/app-icon.png",
    "description": "Choices for the non-verbal and limited verbal",
    "sdkVersion": "18.0.0",
    "orientation": "landscape",
    "version": "1.0.0",
    "slug": "voice-choice",
    "ios": {
      "bundleIdentifier": "com.tysoncadenhead.voicechoice",
      "supportsTablet": true,
      "isTabletOnly": true
    },
    "loading": {
      "backgroundImage": "./assets/images/loading.png",
      "backgroundColor": "#DA5D36",
      "hideExponentText": true
    }
  }
}

0 Likes

#9

Can you link to your entire repo and I can try it?

0 Likes