onseyi
November 10, 2022, 6:21pm
1
I build my app with expo
after running eas build
I keep getting this same error Android build failed: Gradle build failed with unknown error. See logs for the "Run gradlew" phase for more information."
this is the log: error.txt - Google Drive
eas.json
{
"cli": {
"version": ">= 2.6.0"
},
"build": {
"development": {
"developmentClient": true,
"distribution": "internal"
},
"preview": {
"distribution": "internal"
},
"production": {}
},
"submit": {
"production": {}
}
}
I will appreciate your help, this is already frustrating me for the past 3 day now, I cant process to the next stage.
Thanks.
wodin
November 10, 2022, 6:42pm
2
Hi @onseyi
It looks like there’s something wrong with some of your images. Maybe they are not actually PNGs?
onseyi
November 10, 2022, 7:11pm
3
Thanks @wodin for the response
Yes, I have used the image as a dummy data in my data.js file which I have commented cause I am not use it anymore
data.js
export const viewers = [
{
id: 1,
profilePic: images.UserProfile3
},
{
id: 2,
profilePic: images.UserProfile4
},
{
id: 3,
profilePic: images.UserProfile1
}
]
images.js
const UserProfile2 = require("../assets/pix/profile-pic-2.png")
const UserProfile3 = require("../assets/pix/profile-pic-3.png")
const UserProfile4 = require("../assets/pix/profile-pic-4.png")
const UserProfile5 = require("../assets/pix/urs.jpg")
export default {
UserProfile1,
UserProfile2,
UserProfile3,
UserProfile4,
UserProfile5,
}
Am I to remove it, so the error will not appear
onseyi
November 10, 2022, 7:21pm
4
Thanks @wodin for your response and yes I used the image as a dummy data to test before replacing it with api in my data.js which I no long need, I just commented the code.
Am I to remove it total for the error to fix.
data.js
import images from './images'
export const viewers = [
{
id: 1,
profilePic: images.UserProfile3
},
{
id: 2,
profilePic: images.UserProfile4
},
{
id: 3,
profilePic: images.UserProfile1
}
]
images.js
const UserProfile1 = require("../assets/pix/profile-pic-1.png")
const UserProfile2 = require("../assets/pix/profile-pic-2.png")
const UserProfile3 = require("../assets/pix/profile-pic-3.png")
const UserProfile4 = require("../assets/pix/profile-pic-4.png")
const UserProfile5 = require("../assets/pix/urs.jpg")
wodin
November 10, 2022, 8:39pm
5
It looks like it’s only complaining about profile-pic-2.png
, profile-pic-3.png
and profile-pic-4.png
.
If you’re on a Mac or Linux machine, try running:
file assets/pix/profile-pic-?.png
They should all say “PNG image data …”
e.g. if I do that in an app of mine, I get this:
% file assets/*.png
assets/adaptive-icon.png: PNG image data, 1024 x 1024, 8-bit colormap, non-interlaced
assets/favicon.png: PNG image data, 48 x 48, 8-bit colormap, non-interlaced
assets/icon.png: PNG image data, 1024 x 1024, 8-bit/color RGB, non-interlaced
assets/simon-buchou-5Qd3Gj49gzk-unsplash.png: PNG image data, 1242 x 2048, 8-bit colormap, non-interlaced
You could also try copying e.g. your app’s icon or profile-pic-1.png
over profile-pic-2.png
, etc?
onseyi
November 11, 2022, 9:36am
6
onseyi:
images.js
Thanks @wodin I have fix it I just, remove all the images profile-pic-2.png
, profile-pic-3.png
and profile-pic-4.png
I am not making use of them.
1 Like
system
Closed
December 1, 2022, 9:37am
7
This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.