I'm using NativeBase icon on my react app. But when i tried to run it on Android, all of my icons won't show up and i got this following error
WARN Possible Unhandled Promise Rejection (id: 11): Error: The method
or property expo-file-system.downloadAsync is not available on
android, are you sure you've linked all the native dependencies
properly?
Can someone help me? I've been stuck in this problem for days. Thanks.
I think there is a version compatibility issue
install vector-icon by this command
expo install #expo/vector-icons
Try running the following command:
expo install expo-file-system
If you are using icons from react-native-vector-icons, execute following command:
react-native link react-native-vector-icons
if you are not using react-native-vector-icons, make following chnnages:
import { Ionicons } from '#expo/vector-icons'; instead of.. import
Ionicons from 'react-native-vector-icons/Ionicons';.
Once the above steps are done, Restart your app.
I hope it will solve your problem. Refernce
Related
I am trying to
import Geolocation from '#react-native-community/geolocation';
in my react native app
I have done yarn add #react-native-community/geolocation
but I keep getting the module is not linked error.
I have tried restarting the app and added permission in AndroidManifest.Xml but that doesn't help either
I am using "react-native": "0.70.5"
and I am currently using android
Please help, how do I fix this
I've upgraded react-native to latest version (0.68) through react-native CLI, and now every time I'm trying to build for android I get this error:
error: cannot find symbol reactRootView.setIsFabric(BuildConfig.IS_NEW_ARCHITECTURE_ENABLED);
I tried to clean the bundle, made sure my package name is correct (like others issues suggested) and nothing so far..
If you're using the latest version of React Native (i.e: v >= 68), you've to rebuild your projects. it works for me.
Going through react-native migrations file, I've found out that somehow I missed a few migrations related to react-native new architecture (although I would expect it to be automatic when using react-native CLI upgrade command).
I suggest to follow the migrations changes especially on MainActivity.java and MainApplication.java - don't forget to change the "from" and "to" versions to your case:
https://react-native-community.github.io/upgrade-helper/?from=0.65.1&to=0.68.1
I'm having trouble using link dropdown import:
https://pub.dev/packages/dropdown
As the image below I did the import correctly, but an error is occurring. How to solve this problem?
Dropdown Usage Process:
pubspec.yaml dependencies added dropdown 1.0.2 as shown in the image -
I performed the import correctly but gave the error as the first image -
did you run this command
flutter get
Once you run this command, please hot reload your app. If that doesn't work, try to re-run app from start.
This should fix your problem, if problem still persist please contact package developer or leave issue on package github repo.
I'm trying my app on Android Device and when I start the app the dubbuger give me 1 Error and 1 Warning.
The Error is:
Async Storage has been extracted from react-native core and will be removed in a future release. It can now be installed and imported from '#react-native-community/async-storage' instead of 'react-native'. See https://github.com/react-native-community/react-native-async-storage
and the Warning:
Require cycle:
node_modules/pouchdb-find/node_modules/pouchdb-utils/lib/index-browser.js
-> node_modules/pouchdb-find/node_modules/pouchdb-utils/lib/index-browser.js
Require cycles are allowed, but can result in uninitialized values.
Consider refactoring to remove the need for a cycle.
About the Error, I have follow what it said, I have done:
npm i --save #react-native-community/async-storage;
on my root project folder. And then
react-native link #react-native-community/async-storage
And At the last I have imported this: import AsyncStorage from '#react-native-community/async-storage'; on my project.
But I have always the same error.
How can I solve in your opinion this error and this warning?
Thank you!
The first step its correct and you're installing and linking the project
dependencies into your project.
# Install
$ yarn add #react-native-community/async-storage
# Link
$ react-native link #react-native-community/async-storage
The second step seems correct too.
import AsyncStorage from '#react-native-community/async-storage';
Note: Sometimes the error message comes from how you are storing the data
Can you write this part for me, I'll check the issue ?
For remove yellow warning you can:
To disable the yellow box place console.disableYellowBox = true;
anywhere in your application. Typically in the root file so it will apply to both iOS and Android.
console.ignoredYellowBox = ['Warning: Each', 'Warning: Failed'];
Can you try this ?
import {YellowBox} from 'react-native';
YellowBox.ignoreWarnings(['Warning: Each', 'Warning: Failed']);
AsyncStorage used to be a part of the react-native library, but it is now deprecated. The module was removed from the standard library and is now a part of a separate library called #react-native-community/async-storage.
You did not mention if you are using Expo and you did not mention what version of React Native you are using, but in any case, this is the documentation for it:
https://github.com/react-native-community/async-storage
If you are using RN 60+ you need to undo that link, as RN 60+ now uses autolinking. So you would run: react-native unlink #react-native-community/async-storage per the above documentation.
If you are using react-native-cli and not Expo, you probably also need to do a pod deintegrate and pod install to add
- "RNCAsyncStorage (from `../node_modules/#react-native-community/async-storage`)"
to your Podfile.lock file.
first thing: these messages are warnings and they are safe to ignore in this case
console.disableYellowBox = true;
is your friend.
second: you probably are doing things correctly, but you are not the only one who uses AsyncStorages. Probably some packages inside node_modules are using AsyngStorage too, and they are your source of warning. The only solution to this to get updated packages and/or edit them yourself and remove incorrect imports.
I'm asking again because my case wasn't solved on previous answers.
I created a React Native App that works perfectly on Snack, but then I wanted to try it on Expo(I want to add some modules that Snack can't load).
So, I used create-react-native-app to make my project.
Then, after editing the code, I tried to launch it using the Genymotion emulator, but everytime I do it, the below error occurs :
I can't understand what's wrong with it?
I already tried removing node_modules folder, changing React Native and Babel version and reinstalling the project with npm install.
Also, in console, it shows me this error:
22:33:56: Unable to resolve ./components/AssetExample" from "./C:\\Users\\danie\\HC\\App.js`: The module `./components/AssetExample` could not be found"
22:33:56: Failed building JavaScript bundle
but I don't know where should this module be imported? package.json or package-lock.json?
I launch it in Genymotion using the following:
cd HC
npm start android
What can I do? Please help me.
React Native version: 0.55.2
Babel(preset React Native) version: ^4.0.0
Edit: Project Structure & code as requested, I created the repository on GitHub: https://github.com/DanielVip3/HC
^ I didn't push the node_modules folder because it was too large, but I think you already know: it contains all the modules that React Native uses.
The application is looking for ./components/AssetExample in your own application folder.
Please give us your project structure and the code in App.js file (also make sure you export AssetExample class in AssetExample.js file.
What i understand you are trying to do is (probably) that in App.js you import AssetExample from "./components/AssetExample", so possible errors are:
1) path is wrong
2) you don't export default AssetExample in AssetExample.js