Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

The Expo SDK requires Expo to run. It appears the native Expo modules are unavailable and this code is not running on Expo. I want to generate apk

I am using [email protected]enter image description here This app works fine in client expo which installed in device

like image 584
Yahya Mukhtar Avatar asked Sep 13 '19 03:09

Yahya Mukhtar


People also ask

Does Expo support native modules?

The Expo project has made great strides over the last couple of years towards letting developers get most of the benefits of Expo while still allowing them to use native modules. In this post, I'm going to show you how to integrate a native module into a “managed” Expo app using Expo plugins and EAS.

Can you use Expo modules without Expo?

You can run this project by using react-native run-ios or react-native run-android rather than expo start .

How do I get Expo SDK?

You can check your Node version by running the Node -v command on your terminal. Expo offers a command-line interface called Expo CLI. It is used to test the app while it's being developed either in iOS or Android.

How do I update my Expo SDK 42?

Updating Expo Go app If you use iOS simulators and Android emulators for development, remove the existing Expo Go apps. Expo CLI will automatically create new ones when you run your project. If you have an Expo Go app on your phone, update it through Google Play or App Store.

How do I update the SDK version in Expo CLI?

If you’re using a Mac, you might need to run the command with “sudo”: If you have a project created by the previous version of Expo CLI, you need to run the following command at the root of this project: If you built a standalone app previously, remember that you’ll need to create a new build to update the SDK version.

How do I install Expo Go for Android?

Note: Expo Go for Android with support for SDK 46 is not yet live on the Google Play Store — it is currently in review and expected to be released soon. You can install the latest Expo Go by downloading the APK directly or connecting your device to your computer and letting Expo CLI install it when you launch your project.

How do I upgrade from Expo SDK 45 to 46?

However, if you do stick roughly to Expo SDK versions, these steps will help you to upgrade to Expo SDK 46 from 45: Ensure you are using Xcode 13.3 or greater if you support iOS. Update to the latest version of Expo CLI: npm i -g expo-cli. [email protected] or greater is recommended.

What happens when an SDK version is deprecated?

Once an SDK version has been deprecated, you will no longer be able to use the Expo Go app for development or build new binaries via expo build. You will still be able to publish OTA updates via expo publish however.


3 Answers

Ok I believe I found the core problem - DNS issue.

Your Android simulator cannot properly resolve the hostname using your current DNS for whichever OS you are on be it Mac OS, Windows or Linux.

Follow this link to set your DNS address to 8.8.8.8 or some other applicable DNS.

Once you set your DNS properly it should work. Make sure that 8.8.8.8 is the first DNS address in the list(?) of DNS addresses so that your system will resolve hostnames using the Google DNS first.


Reposting the useful information from that link below,

Change the DNS address of your network to 8.8.8.8:

MacOSX:

Open "System Preferences"
Click on "Network"
Select the network which your computer is connected and click on "Advanced"
Select "DNS", Select the "+" button, type "8.8.8.8"
Select "Ok" and "Apply"

Windows & Linux:

https://developers.google.com/speed/public-dns/docs/using

After that close the emulator and start it again.

like image 91
Seng Wee Avatar answered Oct 19 '22 20:10

Seng Wee


This case happened to me whenever I switch from a network to another without restarting my emulator.

The simplest way to solve this was to restart my emulator.

I hope it helps,

like image 29
mahmoud mehdi Avatar answered Oct 19 '22 20:10

mahmoud mehdi


For my case, this error occurred because I changed from LAN to Wireless Internet connection while the project is building.

Solution: Close the Emulator and restart Android Studio. Run the project (either npm start or expo start) and this worked for me.

like image 35
Julius Peter Odeke Avatar answered Oct 19 '22 20:10

Julius Peter Odeke