Change production key in eas.json
to this
"production": {
"android": {
"buildType": "apk"
}
}
So now your eas.json
like this
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"android": {
"buildType": "apk"
}
}
},
"submit": {
"production": {}
}
}
To build into .apk file, you can build using production profile. The command like this
eas build --profile production --platform android
Change production key in eas.json
to this
"production": {
"android": {
"buildType": "apk"
}
}
So now your eas.json
like this
{
"cli": {
"version": ">= 0.52.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {
"android": {
"buildType": "apk"
}
}
},
"submit": {
"production": {}
}
}
To build into .apk file, you can build using production profile. The command like this
eas build --profile production --platform android
Here is the detailed instruction: https://docs.expo.dev/build/eas-json/
You need to create eas.json in the project directory as:
{
"build": {
"preview": {
"android": {
"buildType": "apk"
}
},
"production": {}
},
"cli": {
"version": ">= 0.52.0"
}
}
Then use the following command:
eas build -p android --profile preview
Regards, Shameel
Videos
Is there any way that we can build .apk or .aab file locally instead of eas build.
I am on free plan
There's no issue in waiting but for the last 30 minutes its stuck on less than 5 minutes.
I have an app integrated with firebase for authentication and database, I want to test the features of this app on my phone without any environment on top. Like a production build. But without eas because it's very slow in free tier.
How can I build an apk similar to that of production and directly download it on my android phone?
As of August 2021, the Play Store only allows new apps to upload AAB files. Old apps are grandfathered into allowing apks for a while. Short of a specific deal with Google (good luck with that), if you have a new app you will need to upload an aab instead.
Currently, your development build is building an apk that's only meant for internal distribution. Once you remove "distribution": "internal", that's nested under "development" and run the build process again, it'll create an .aab that you'll be able to submit to Play Store.
You can find more information at the Play Console Help Link
Hey I'm working on a react native project and everything runs normally while testing with the emulator in development env but when i built my expo app to get an apk with this command eas build -p android --profile preview
After i installed the apk on a real device or emulator but with apk it instantly crashes ! But if i run it on expo go ! it runs normally ! I need a solution to this ASAP please !
How can i log the error while testing with apk ? so atleast i know where the issue is coming from