-
Notifications
You must be signed in to change notification settings - Fork 76
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Local builds not working on windows #1726
Comments
Message is correct, windows is not supported. You can still use Note that WSL technically it's not officially supported(we do not test it), but it seems to work well. |
I tried |
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 |
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. |
You will need to sign the apk with a keystore on android studio for it to build a release apk |
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. |
@OOCAZ i would really appreciate this. I tried it but im getting an error when trying to use any eas command like login or build --local. The error is following:
|
Hey @LujoTheRealOne. Could you give some more verbose errors? The only thing I can think of off the top of my head is, do you have the eas-cli installed globally? Let me know and we can work through this. |
Hey @OOCAZ, you were right, I figured it out already. Thx. But now I'm facing the next issue. The console is telling me, that it can't locate the Ndk and no SDK provided but I installed openjdk and an SDK. |
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! |
Eu tenho o mesmo problema, não faz sentido o WSL ter interface grafica, risos. Pode me ajudar como executar minhas builds --local? |
Hey! It doesn't make much sense but I got it working in WSL 2 on both windows 10 and 11. I agree it's unorthodox, but it works, if you need help installing android studio specifically or have any specific errors let me know. |
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 :( |
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? |
I haven't found how to do this yet either. |
@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. |
@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... |
I guess you can build it in Android Studio too with ALSOO : Alsoo it can be a lil annoying to build it this way, ( i had hard time setting up correct java, kotlin and gradle versions ), idk what problems ios developers might face, eas does everything by itself, so it does feel a lil easy, still if building a android version on windows if what u want, Android Studio got your back ! Hope it helps ! |
I'd start using Flutter at this point, its quite straight forward and well maintained, and a bit faster in performance due to it's 'Ahead-of-Time" (AOT) compilation. ( Also I like Material You Design ) |
@crystalarcus , Good choice, but flutter job market is so dull, idk why... Also, get linux, life will be amazing... |
Oh btw, you said you figured it out, how to use EAS in wsl, did you do it using only android-sdk tools or did you downloaded whole android studio ? |
I did it using the SDK tools without installing the Android studio on wsl, but the build got failed !! |
@ananduremanan so....u tried with Android Studio ? did it work ? cuz I am about to download it for linux |
Yeah I only ever got it working with Android Studio, the SDK tools never worked for me, but Android studio was working last I checked. |
@OOCAZ I need help with this : ----- End of the daemon log -----
from stackoverflow I found this solution, the answers said Deleting the daemon subfolder in |
So I ran your command and it worked on the eas build systems. But I added the --local tag and it ran and built just fine for me. Are you still having the issue? Any chance you could try not doing a development build and just doing a default or production build? Let me know if that works. |
@OOCAZ I ran it for preview build as :
and it was stuck there for 30 min untill I ended with ctrl+c. |
@crystalarcus The error appears to be this in particular: |
@OOCAZ hello there, so I tried running today with same command but got following error :
|
You guys should use this docker image |
@rafi16jan not working here :( |
|
My problem is build freezing in random tasks 👎 |
Ok, let's go. I FIGURE OUT A DEFINITELY SOLUTION. Before all, follow these steps:
Did it, you may proceed
MYAPP_UPLOAD_STORE_FILE=your-upload-key.keystore
MYAPP_UPLOAD_KEY_ALIAS=your-key-alias
MYAPP_UPLOAD_STORE_PASSWORD=*****
MYAPP_UPLOAD_KEY_PASSWORD=*****
...
android {
...
defaultConfig { ... }
signingConfigs {
release {
if (project.hasProperty('MYAPP_UPLOAD_STORE_FILE')) {
storeFile file(MYAPP_UPLOAD_STORE_FILE)
storePassword MYAPP_UPLOAD_STORE_PASSWORD
keyAlias MYAPP_UPLOAD_KEY_ALIAS
keyPassword MYAPP_UPLOAD_KEY_PASSWORD
}
}
}
buildTypes {
release {
...
signingConfig signingConfigs.release
}
}
splits {
abi {
reset()
enable true
universalApk true
include "armeabi-v7a", "arm64-v8a", "x86", "x86_64"
}
}
}
...
7.1. To generate an AAB file run the code: npx react-native build-android --mode=release 7.2. To generate an APK file, go to android folder and run the code: ./gradlew assembleRelease Possible errorsBuild freezing
[wsl2]
memory=5GB
wsl --shutdown
|
@marius-haugan They quite should, but why does it matter, just running command |
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.
The text was updated successfully, but these errors were encountered: