eas-cli: Local builds not working on windows

Build/Submit details page URL

No response

Summary

Expo local builds are not working on windows. Whenever I run eas build --profile preview --platform android --local. I get the following message: Error: Unsupported platform, macOS or Linux is required to build apps for Android. If eas-cli does not support building Android apps on windows that would be very frustrating because I would like to build on my machine not on your cloud service.

Managed or bare?

Managed

Environment

expo-env-info 1.0.5 environment info: System: OS: Windows 10 10.0.22621 Binaries: Node: 18.13.0 - C:\Program Files\nodejs\node.EXE Yarn: 1.22.19 - C:\Program Files\nodejs\yarn.CMD npm: 8.19.3 - C:\Program Files\nodejs\npm.CMD IDEs: Android Studio: Version 2021.1.0.0 AI-211.7628.21.2111.8309675 npmPackages: expo: ~48.0.4 => 48.0.4 react: 18.2.0 => 18.2.0 react-native: 0.71.3 => 0.71.3 Expo Workflow: managed // -> I have windows 11 btw

┌─────────────────────────────────────────────────────────────────────────┐ │ │ │ There is a new version of expo-cli available (6.3.2). │ │ You are currently using expo-cli 5.4.11 │ │ Install expo-cli globally using the package manager of your choice; │ │ for example: npm install -g expo-cli to get the latest version │ │ │ └─────────────────────────────────────────────────────────────────────────┘ √ Found all copies of expo-modules-autolinking All copies of expo-modules-autolinking satisfy ~1.1.0 √ Found all copies of @expo/config-plugins All copies of @expo/config-plugins satisfy ~6.0.0 √ Found all copies of @expo/prebuild-config All copies of @expo/prebuild-config satisfy ~6.0.0

🎉 Didn’t find any issues with the project!

Error output

Error: Unsupported platform, macOS or Linux is required to build apps for Android.

Reproducible demo or steps to reproduce from a blank project

Idk just run a local android build on Windows.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 4
  • Comments: 36 (2 by maintainers)

Most upvoted comments

Message is correct, windows is not supported. You can still use eas build --local on windows inside WSL or run npx expo prebuild and bulid from android studio.

Note that WSL technically it’s not officially supported(we do not test it), but it seems to work well.

Ah yes, you can only build for android OS on an Apple OS. Likewise you can only run a build for iOS directly on an android phone. Otherwise you are welcome to line up in the EAS free queue for decades until both platforms are obsolete.

This seriously doesn’t work on Windows??? Are you serious now?

$ eas build --local
√ Select platform » Android
Unsupported platform, macOS or Linux is required to build apps for Android
    Error: build command failed.

изображение

How can this not be made more clear in the docs?! That’s disastrously bad. This seems to be utterly impossible to learn beforehand. You seem to have to learn it by trail and error. I discovered this limitation just now, and am still unable to find any material mentioning it in the docs:

You’d imagine at least one of those articles could mention that Windows is not supported by the EAS CLI.

Why this is closed? Does anybody could explain the WSL method?

You guys should use this docker image

https://github.com/hmerritt/android-sdk

Update to this issue I did get it building on WSL (Ubuntu 22) and can provide instructions if wanted, you cannot use the raw android-sdk, you have to install android studio, make sure the android-sdk is uninstalled and then you can build it. Happy to help if anyone needs help building on WSL. Took me like 3 days to figure all of this out.

@crystalarcus , Good choice, but flutter job market is so dull, idk why… Also, get linux, life will be amazing…

@OOCAZ , somehow I figured it out and as @crystalarcus said it takes a lot of time to build while in linux it takes only few minutes…

@ananduremanan I can explain it, but essentially you just install the linux version of android studio on wsl and it will work. I can give more in depth set of steps if you want. @suprunchuk same for you too.

Hello there 👋, I have been facing hard time figuring out how to build expo preview or development build offline. So I discovered EAS with --local flag don’t support windows, and installed ubuntu on WSL ( I am high schooler and linux OS is something new to me). So this is how it went : *** long ( and painful) story ahead, if you are short on time, you may skip and go to END*** ------------------------------Start------------------------------------------------------ Figuring out how ubuntu works, and accessing my project files on windows in wsl. Ran eas build in it hoping it works but oh well… it said Java is not installed. Installed Java ran eas build --local It started downloading gradle-8.0.1-all.zip ( I thought it would use gradle i am using for windows, by this time i realized ubuntu wont take environment variables from windows ) Stopped download, installed gradle and did path setting. ( limited internet, so i wanted to get it worked with gradle’s zip i had locally on windows ) Ran eas build --local IT STARTED DOWNLOADING GRADLE AGAIN ! I stopped it, than found out, I have to change distributionURL in gradle-wrapper.properties to locally installed zip. changed it and ran eas and wow it really worked, ( for 10 sec and than…) I got error about android sdk don’t have linux.something ( I set the ANDROID_HOME in ubuntu the same i used in windows ), realizing I have to download different for linux, i did and did path setting again. ran eas build, and got error that android license not verified/not found ( something like that ) than I searching on web came on this page and found out as u said above: you need to install Android Studio ( Whole IDE ) in wsl. ----------------------------END----------------------------------------------------------------- Also a few days ago, with many errors and somehow managing Java, Gradle, Kotlin versions to match each other, I somehow built a development build with Android Studio in Windows ( using npx expo run:android) . But the build process kinda took long, like 40 min, and on EAS server it takes like 15 min. So my questions : If I can make builds in Android Studio on windows, should still go for eas, ( if it takes lesser time for building or any other benefits, than i would like to use eas ) ? Also is there any difference between build made from npx expo run:android and eas build ? thing is I tried to install the build made from android studio over the eas build ( the one from eas server ), normally it would simply update the app, but when I tried to install the one from android studio, it said : “App not installed because package conflicts with existing package”, so i uninstalled existing app and and than installed the android studio build and it worked fine, got similar error when trying to install previous eas build over android studio build. maybe the credentials are different ?

I think google playstore can check the device on which you build your application. If I use WSL to build the application, it will affect my store account. If expo only supports ios and linux, it is a big disadvantage for expo. maybe I’ll go back to using react native cli 😦

So you cannot install the default SDK, you have to uninstall it and then install Android studio for Linux. Once you do that it will walk you through the standard setup and prompt you to install the SDK suite. But if you do not have the old default SDK uninstalled it won’t allow you to install the Android Studio SDK.

Ping me again if none of that makes sense.

@OOCAZ You know how to install Android Studio on Linux Ubuntu WSL? It’s only a command prompted system.

Yep. Just download it for Linux, unzip the tar and then navigate inside of it to the studio.sh and execute it. Then it will create a UI for you to finish the install.

I know it’s weird, but it’s what I did to get it working.

Oh okay, I will try it out tomorrow. Shut down my Laptop already. Thanks for your time!

If you have dev client configured in your project then Debug build will include dev client and Release will not. Just build release version of an APK