React Native: How to build android app in Expo? - react-native

I am building an android app with Expo, but failed every time.
Here is my app.json
"expo": {
"name": "Imct",
"slug": "Imct",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./src/asset/Logo/IMCT.png",
"splash": {
"image": "./src/asset/Logo/imct2.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.isuzu.imct"
},
"android": {
"versionCode": 2,
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
},
"googleServicesFile": "./google-services.json",
"package": "com.isuzu.imct"
},
when I run
expo build:android
I got the results is
Screenshot 2022-03-17 104029
How can I fix this?

Related

Expo React Native iOS push notifications - How to change the icon

I have my Expo React Native - Stand Alone app (Published to Test Flight) and I still seeing the Expo icon on the push notifications:
This is my app.json
{
"expo": {
"name": "test-answers",
"slug": "test-answers",
"version": "1.0.6",
"orientation": "portrait",
"icon": "./assets/images/appicon-1024.png",
"scheme": "myapp",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/images/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"notification":{
"icon":"./assets/images/push-notification-icon-expo.png",
"color": "#311b92",
"androidMode": "default",
"androidCollapsedTitle": "Updates from Test Answers",
"iosDisplayInForeground": true
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"platforms" :[
"ios",
"android"
],
"ios": {
"icon": "./assets/images/appicon-1024.png",
"usesAppleSignIn": true,
"supportsTablet": true,
"bundleIdentifier": "com.test.test",
"config": {
"googleMobileAdsAppId": "ca-app-pub-111222~111222",
"googleMobileAdsAutoInit" : true
},
"googleServicesFile": "./assets/GoogleService-Info.plist",
"buildNumber": "1.0.6"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/images/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"config": {
"googleMobileAdsAppId": "ca-app-pub-111222~111222",
"googleMobileAdsAutoInit" : true
},
"googleServicesFile": "./assets/google-services.json",
"package": "com.test.test",
"versionCode": 1
},
"web": {
"favicon": "./assets/images/favicon.png",
"config": {
"firebase": {
"apiKey": "abc123",
"measurementId": "G-123abc"
}
}
}
}
}
Any clue?

Expo notification icon not showing

I have built an app using React Native (Reminder App) and i need it to show notification. That is working perfectly but when i receive a notification the icon shows as a small purple square. Below is an image of similar output found on google
Expected Output: Should show my icon on top left of notification
My current code in app.json is:
"expo": {
"name": "Reminders",
"slug": "Reminders",
"version": "2.0.0",
"orientation": "portrait",
"icon": "./assets/icon1.png",
"splash": {
"image": "./assets/splash1.png",
"resizeMode": "cover",
"backgroundColor": "#FFFFFF",
"plugins": [
[
"expo-notifications",
{
"icon": "./assets/icon1.png",
"color": "#ffffff"
}
]
]
},
"notification": {
"icon":"./assets/icon1.png",
"color": "#7f2ee1"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon1.png",
"backgroundColor": "#FFFFFF"
},
"icon":"./assets/icon1.png",
"package": "com.d99.reminders",
"versionCode":4
},
"web": {
"favicon": "./assets/icon1.png"
}
}
}
I followed the instructions on the official docs for expo-notifications but the issue remains.
Any idea on how to show my icon there?
edit: here is the icon [icon]

Failed to resolve plugin for module "react-native-fbads" relative to [project dir]

react-native-fbads: 7.1.0
react-native: 0.68.2
I am using an eas build for a project that is part of a managed expo workflow. I am trying to integrate Facebook ads into the app using react-native-fbads. After following their expo installation instructions in the main readme, when I attempt to run eas build --profile development --platform ios I get the following cryptic error:
Failed to resolve plugin for module "react-native-fbads" relative to "D:\Projects\pollenbbmap"
Can anyone help me resolve this error? Happy to provide any additional information.
My app.json looks like this
{
"expo": {
"owner": "gainesvilleboyz",
"name": "pollenbbmap",
"slug": "pollenbbmap",
"version": "0.0.1",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": ["**/*"],
"ios": {
"supportsTablet": true,
"bundleIdentifier": "com.arham23.pollenbbmap"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#FFFFFF"
}
},
"web": {
"favicon": "./assets/favicon.png"
},
"plugins": [
[
"react-native-fbsdk-next",
{
"appID": "XXXX",
"clientToken": "XXX",
"displayName": "Pollen Map App",
"advertiserIDCollectionEnabled": false,
"autoLogAppEventsEnabled": false,
"isAutoInitEnabled": true,
"iosUserTrackingPermission": "This identifier will be used to deliver personalized ads to you."
}
],
"react-native-fbads"
]
}
}

building for android with expo

I'm trying to build my react-native app but I keep getting this error.
{
"expo": {
"name": "NuCamp",
"slug": "nucampsite",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"bundleIdentifier": "co.nucamp.nucampsite.student"
},
"android": {
"package": "co.nucamp.nucampsite.student"
},
"web": {
"favicon": "./assets/favicon.png"
}
}
}
this is my first time doing this and I'm completely lost. I tried searching for other people that had the same problems but I couldn't find any.
you are using expo-cli#3.9.1, as the warning explains there is a much newer version and you should install it and use it instead :) that will resolve your issue

Why I get stuck in loading Screen after building the apk in expo?

Usually when i login either with google or Facebook in my app i get automatically redirected to the home menu that is a map but after i build and ran my app i get stuck in loading Screen every-time after i log in
this is my app.json
{
"expo": {
"name": "AgriEdgeApp",
"slug": "AgriEdgeApp",
"platforms": [
"ios",
"android",
"web"
],
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"splash": {
"image": "./assets/splash.png",
"resizeMode": "contain",
"backgroundColor": "#ffffff"
},
"updates": {
"fallbackToCacheTimeout": 0
},
"assetBundlePatterns": [
"**/*"
],
"ios": {
"supportsTablet": true
},
"android": {
"package": "expo.AgriEdgeApp.AgriEdgeApp",
"versionCode": 1
},
"description": ""
}
}
before building :
before building
after building :
after building