Use eas-cli to set up Android Keystore non-interactively from command line? - expo

Is it possible to use eas-cli to set up the Android keystore for a project non-interactively from the command line?
Adding -non-interactive to eas build --platform android fails if I haven't previously interactively set up the Android keystore.
e.g. I want some command like eas build --platform android --non-interactive --initialize-keystore or eas credentials --non-interactive --initialize-keystore
(For context: for a project I'm working on, I want to be able to create and build new Expo automatically)

Related

Convert Expo managed workflow to bare React Native

I am going to convert current expo project from Expo managed workflow to bare React Native to use react-native-branch.
I run this command on terminal.
expo eject
I can run app on local environment, but debug and release apk is not working.

Expo eas android build error: cannot copy 'C:\Users\xxx' to a subdirectory or itself,

I get this error when i use this line:
eas build -p android
I am trying to build the project but it gives this error:
Error: Cannot copy 'C:\Users\xx' to a subdirectory of itself,
'C:\Users\xx\AppData\Local\Temp\eas-cli-nodejs\5897d1cd-52ae-4c3c-a5c4-577
69487c9f8-shallow-clone'
This answer may be late but I came across this in assisting a fellow dev and think I can answer this for other devs in the future at least.
So, EAS has integration capabilities with git. What that means is that for instance, when running a build command, EAS uploads a shallow clone of your repository to EAS Build. This error will come up when you do not have git setup on your machine or your project has not remote base that you're working off of.
There is a solution to disable the git integration ability for your project if you so wish. That is setting the environment variable EAS_NO_VCS=1 So when running your build command, do this instead:
Mac: EAS_NO_VCS=1 eas <command>
Windows: npx cross-env EAS_NO_VCS=1 eas <command>
Reference: https://github.com/expo/fyi/blob/main/eas-vcs-workflow.md
Hope this helps.

Expo eas retrieve app archive download url

After migrating from expo-cli to eas-cli, I make the app build by using command eas build -p android.
Then, in order to be able to use it within my custom CI, I get the app archive download url. I used to use expo url:apk. This command is not working anymore, since I make the build with eas.
Does anyone know how to get the download url using eas?
eas build:list --json --limit=1 --platform=android | jq '.[0].artifacts.buildUrl'

How to generate Apk file with Expo's Manage Work flow

I have project with expo managed work flow , my problem is how to generate APK , please help me
This command you can use to generate APK.
expo build:android
To generate an Android APK you have to run the command:
expo build:android
Then Expo will give you an URL to follow your build status, normally it takes like an hour depending on your projects size and expo's queue, and after the build is done you can download it from that URL or on your Expo Build Dashboard expo.

Environment variable issue in build an apk in ionic project

I am trying to build an apk in ionic 2 but while building is getting following error.
Error:
Error: Failed to find 'ANDROID_HOME' environment variable. Try setting setting it manually.
Failed to find 'android' command in your 'PATH'. Try update your 'PATH' to include path to valid SDK directory.
After that, I set the environment variable and path. Even though still am getting that error again can anyone please help me how to solve this issue
Instruction 1:
After adding your ANDROID_HOME, make sure you do the below:
Restart your System or run source ~/.bash_profile
Remove Android platform from your project ionic cordova platform rm android or ionic platform rm android
Add Android platform ionic cordova platform add android
Then ionic cordova run android or ionic run android
Instruction 2:
To set your ANDROID_HOME and JAVA_HOME, follow the below steps:
Run command open ~/.bash_profile
Paste the below in the file that opens on your Text editor
export ANDROID_HOME=/usr/local/Cellar/android-sdk/24.4.1_1
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools
Save - "Command S" or "Ctrl S"
Then Follow the "Instruction 1:" above
NOTE: Make sure you have 24.4.1_1 SDK
Hope this helps.