Release build problem

#1

Hi, I’m new to RN. I had a quick look last year (no Expo that time)
Now I re-approched and I see there is this Expo structure. I have few question:

  1. I read a lot of documentation, but I’m still not sure what’s the use for Expo in RN.
  2. I see there is no more “android” and “ios” directories. If I want them I have to irreversibly detach from Expo. Does it means I cannot open my app with Xcode without detaching?
  3. I tried to play around with my first app, and honestly launch it with react-native-scripts android on device (I guess it’s debug mode) is really slow and laggy. Following the docs “Building Standalone Apps” I tried to make a release build. It looks like most of the work is done remotely or what? How the release build process works? I cannot build the apk by myself? Are they private am I right :)?
    The general questions part is over, now the real question:

In meantime, while I was waiting for the build to complete I’ve got this error:
[stderr] /src/exponent/android-shell-app/ReactAndroid/src/main/java/com/facebook/react/modules/dialog/AlertFragment.java:39: Error: Avoid non-default constructors in fragments: use a default constructor plus Fragment#setArguments(Bundle) instead [ValidFragment]

How can I solve?

Thanks

#2

Hi! To answer some of your more general questions, I would recommend looking at our docs:

https://docs.expo.io/versions/latest/workflow/how-expo-works
https://docs.expo.io/versions/latest/workflow/create-react-native-app
https://docs.expo.io/versions/latest/introduction/faq
https://docs.expo.io/versions/latest/introduction/already-used-react-native
https://docs.expo.io/versions/latest/introduction/why-not-expo

The standalone app build servers are offered as a convenience, but it is definitely possible to run the build yourself:

You’re correct that to have ios or android directories you’ll need to detach/eject to either ExpoKit or using RN by itself.

I’ll ping some teammates to see if they can help you diagnose the build error you’re seeing for your android app.

#3

thanks, I hope someone will clarify all the remaining doubts, in meanwhile I add a new related question:
Here I read:
“Since you write your code in Javascript, we bundle it up and serve it from S3. Every time you publish your app, we update those assets and then push them to your app so you’ve always got an up-to-date version.”

This means my assets are on Amazon S3? My standalone app assets? So my app needs the internet connection, even if it doesn’t actively uses (it’s an offline app)?

#4

Expo can bundle all your assets and JS inside your binary if you want. See the guide on offline support.

You can also completely prevent Expo from trying to fetch any new JS from our CDN by disabling OTA updates.

#5

Still waiting for the someone who answer to the first post :slight_smile:
About the remote assets: sorry I need to be absolutely sure about this. My standalone app built in standard way have something in CDN, I undestand. Which assets do you mean? Just the images or some JS files or something else? Anyway I’m reading that page about offline support, my app have to be completely offline I’m sure there is a way, am I right?

closed #6

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