Eas Build doesn't build apk file, despite configuring eas.json file

My eas.json file has been configured like the above image​:point_up::point_up: based on the eas documentation.

However after running eas build I still get an aab file instead of an APK file.

I would grateful appreciate a solution to the above question.

Thanks in advance

Your configuration seems correct. Are you using the managed workflow? If not, make sure that your build.gradle is configured to produce and apk when gradle command :app:assembleRelease is executed, because that is what happens when you define "buildType": "apk".

Also make sure that you specify this build profile when running EAS build, with eas build --profile development. If you don’t specify a profile, it will default to production.

1 Like

Yes, I am using the managed workflow.

I am actually using expo-cli

@kbrandwijk there is nothing like build.gradle in my ide, I am using visual studio code

@kbrandwijk I ran eas build --platform android and it built an aab file despite the configuration.

So my question is this, since my configuration is correct & I am using the managed work flow what command do I need to run to build an APK file instead of an aab file

If you literally ran eas build --platform android then, like I mentioned in my first reply, it uses the production build profile, not the development build profile that you shared a screenshot of. If you want to build the development profile, you need to explicitly tell EAS:

eas build --platform android --profile development
1 Like

Alright, thanks.

Would check it out & get back to you.

Really grateful for your help

Thanks :bowing_man:t4:

2 Likes

Alright i ran the eas build --profile development command and was able to get an apk of my app, but after downloading the app, the app i saw/got was not what i was expecting, it was like i created another version of expo go.

I could not see the result/output of my code in the app i created/dowloaded

The image below is what i saw after opening the i app i created using the command eas build --profile development. I was actually expecting to see my app not this

The image below was the kind of result i was expecting after opening my app.

What you have built, is a development client, a version of Expo Go built with your own dependencies, so that you can use expo start --dev-client to start local development like you would with Expo Go. That’s how the build profile was configured.

If you want to build a standalone apk, create a build profile with the same settings, but with developmentClient: false (which is also the default value if you leave that line out completely), and run eas build with that profile.

1 Like

Alright thanks :bowing_man:t4:‍.

Would do that & get back to you.

Alright, i changed developmentClient: true to false developmentClient: false as in the image below, however i still got the previous developer client app.

The solution which worked was for me to totally remove developmentClient: from my eas.json file just as you suggested. I then ran eas build --platform android --profile development and it worked.

Here is how my eas.json file looks like

1 Like

Thanks for the feedbacks & suggestions @kbrandwijk i am really very grateful.

If there is any other stuff you think might be wrong with my solution or eas.json file please let me know.

Thanks in advance

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.