My App crashes when I navigate to my speedtest screen - react-native

My app gets closed as soon as I click on my speedtest screen.This is my code. It runs well in debugging mode. But the screen does not open in the release version(apk). These are the packages I am using for this component.
import React, {useState, useEffect} from 'react';
import {
Text,
Image,
View,
ScrollView,
TouchableOpacity,
SafeAreaView,
StatusBar,
ImageBackground,
Dimensions,
Modal,
TouchableWithoutFeedback,
} from 'react-native';
import RNFetchBlob from 'rn-fetch-blob';
import {NetworkInfo} from 'react-native-network-info';
import Ping from 'react-native-ping';
import Icon from 'react-native-vector-icons/Ionicons';
import RNSpeedometer from 'react-native-speedometer';
import {measureConnectionSpeed} from 'react-native-network-bandwith-speed';
import Speedometer from 'react-native-cool-speedometer';
import {AppFont, Color} from '../components/Constatnts';
import {PermissionsAndroid} from 'react-native';
import WifiManager from 'react-native-wifi-reborn';
import {AUTH, LOGIN_URL} from '../components/APIs';
import axios from 'react-native-axios';
import {Detail} from '../components/Token';
import {UserId, Token} from '../components/Token';
import LinearGradient from 'react-native-linear-gradient';
import StyleSheet from 'react-native-media-query';
import AsyncStorage from '#react-native-async-storage/async-storage';

i guess maybe module import from 'react-native-gesture-handler',
ex: import FlatList from 'react-native-gesture-handler'. it work on debug but die with release in some case. or try import 'react-native-gesture-handler' in App.js or index.js .
For the most accurate, you need to open android studio, select build variant chosse release, select error log and filter with pakage name

Related

Invariant Violation: requireNativeComponent: "BVLinearGradient" was not found in the UIManager

the error above is shown in this import
import React from 'react';
import {
View,
Text,
TouchableOpacity,
Dimensions,
StyleSheet,
StatusBar,
Image
} from 'react-native';
import * as Animatable from 'react-native-animatable';
import LinearGradient from 'react-native-linear-gradient';
import MaterialIcons from 'react-native-vector-icons/MaterialIcons';
import { useTheme } from '#react-navigation/native';
this is the import statement bringing the error
Try:
For iOS
cd ios
pod install
rebuild project
For Android:
Uninstall application in Android emulator
cd Android
./gradlew clean && ./gradlew cleanBuildCache
npm run android
It worked but first, I need to upgrade my Java version.
Thanks.

TypeError: undefined is not an object (evaluating 'config.glyphs.forEach') using icomoon in react native

here by the following code
import React from 'react';
import {
SafeAreaView,
StyleSheet,
ScrollView,
View,
Text,
StatusBar,
} from 'react-native';
import {createIconSetFromFontello} from 'react-native-vector-icons';
import fontelloConfig from './selection.json';
const Icon =createIconSetFromFontello(fontelloConfig);
export default() => <Icon name="icon-1801287" size={80} color="#bf1313"/>
please how to correct the issues
i add the ttf file to the android assests file i got the same error
selection.json is for icomoon but config.json is for Fontello, so you have to use createIconSetFromIcoMoon(require(./selection.json)) instead of createIconSetFromFontello(require(./selection.json))

Error in Metro Bundler: 'AsyncStorage has been extracted from react-native core and will be removed....'

I am getting the error in metro bundler as mentioned in Title but I am not using Async anywhere or I did not import Async from anywhere (not even from react native core).
Below are my imports
import React, {Component} from 'react';
import {StyleSheet} from 'react-native';
import {Provider} from 'react-redux';
import {createStore} from 'redux';
import firebase from 'firebase';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
import Feather from 'react-native-vector-icons/Feather';
import * as Animatable from 'react-native-animatable';
Screen Shot of error
I have checked this issue already but as I have not used the Async directly in my code so this does not completely solves the error

createDrawerNavigation() has been moved to react-navigation-drawer

createDrawerNavigation() has been moved to react-navigation-drawer. See https://reactnavigation.org/docs/4.x/drawer-navigator.html for more details
It seems like you're trying to import createDrawerNavigator() from the react-navigation library. However, this function has since moved to react-navigation-drawer. The error already tells you exactly what's happening. If you take a look at the documentation this error links you, you'll find what to import:
import { createDrawerNavigator } from 'react-navigation-drawer';
For starters>
For App.js imports in project or src, remove {createDrawerNavigator} from import from "react-navigation" to 'react-navigation-drawer'
ex:
From => import {createDrawerNavigator, createStackNavigator, createAppContainer} from "react-navigation";
Remove => import {createStackNavigator, createAppContainer} from "react-navigation";
To => import {createDrawerNavigator} from 'react-navigation-drawer';

It shows all imports in imports declaration are unused in react native

Import React, {Components} from 'react';
This was not working and components fields is unusable.
You are importing it the wrong way. The correct way is as follows:
import React, { Component } from 'react'