11:01:29: Failed building JavaScript bundle
11:01:29: Unable to resolve ./app/img/grangologo.png" from ".//App.js: could not resolve/home/gokul/React/Grango/app/img/grangologo.png' as a file nor as a folder","name":"UnableToResolveError","type":"UnableToResolveError","errors":[{}]},"type":"bundling_error"}"
you'r path to the image is wrong, try to use some console.log's to check yourself if the image was imported.
(p.s you could avoid all of it by using proper editor)
Related
I want to display a pdf in my react-native app. I used documentation from https://www.npmjs.com/package/react-native-pdf. I installed rn-fetch-blob and react-native-pdf. i have linked react-native-pdf .
but when i ran command "react-native link rn-fetch-blob" it didn't get linked.
and i got the following message in command prompt:
rn-fetch-blob will not automatically add Android permissions after 0.9.4
please run the following command if you want to add default permissions :
RNFB_ANDROID_PERMISSIONS=true react-native link
I tried this command and i got:
"'RNFB_ANDROID_PERMISSIONS' is not recognized as an internal or external command,
operable program or batch file."
I am using this version: react-native-cli: 2.0.1
react-native: 0.59.8
I also tried to set it manually with the reference https://github.com/wkh237/react-native-fetch-blob/wiki/Manually-Link-Package
I was to set it in 3 files according to the last reference i provided -
I used first: "node_modules/rn-fetch-blob/android/build.gradle" (which is "android/app/build.gradle" in documentation )
I used second: "node_modules/rn-fetch-blob/android/src/main/java/com/RNFetchBlob/RNFetchBlob.java" (which is "MainApplication.java" in documentation )
third file was "android/settings.gradle" which i didn't find in "node_modules/rn-fetch-blob/android/"
so i bacame unable to set it manually.
May be I am using wrong file paths to set it manually. If any one have any idea about it or any suggestions for me to solve it in a better way. please help me out.
Or if any other way to solve "displaying a pdf in react-native" please provide me that also.
linking problem is solved after setting it manually and than by using command set RNFB_ANDROID_PERMISSIONS=true in command prompt.
But now still getting an error after using in code import Pdf from 'react-native-pdf'; . the error is shown below.
anyone having idea about it. or any other way to display a pdf in react-native, kindly let me know.
If you run this command "rn-fetch-blob": "^0.10.13",install this version is worked for me,if you install another one your app was crashed/stoped.
I'm learning react native expo
I want to require an image from assets/images
The image I want to require is noti.png
I got this error
What am i missing?
You are passing the location of the image incorrectly. as you can see in the error: the module .. could not be found
To fix it, check the location of current file you are calling that image then go back to the exact location and call it. Also If you are using IDE they recommend you the location.
Update:
require('../assets/images/noti.png'
I keep receiving this error when running my App.js for React Native that was working perfectly well before I attempted installing Victory charts. Somehow something broke and after over three hours of work I am unable to figure out a solution. I have tried everything I could find on the web including uninstalling watchman, reinstalling watchman, reverting to React Native 0.55.4, some other recommended commands. Nothing is working.I am so confused.
$ yarn add react-native-scripts
This helped.
I think the other library may hurt the installation part of your package. To solve this issue on IOS you need to add its library like below:
First do 'yarn add react-native-scripts'. In the case that it dose't work continue other steps.
1-Go to the node module of your project and find the package folder and find the ios file inside it.
2- Then drag it into ‘library’ section of your xcode. (It is the subset of your project folders)
3- Then go to ‘build phase’ and in the ‘Link binary with libraries’ add it there by clicking on the plus sign
4- Then in some cases you need to add the correct path of the ios file inside your node module in the xcode. To do that you should go to ‘build setting’ section in the xcode and search header there. Then you need to add the path there below other paths.
5- Then clear everything (cmd+shift+k) and then finally compile it.
I hope it works for you.
In my case the "crna-entry.js" file does exist in the roots and my project should work (nothing have been modified from last time when it does work).
After hours searching, finally I figured out the reason:
the packager's directory checking is case-sensitive and in windows terminal the drive "c:/" will not be auto-corrected to "C:/" which will lead to error.
Hope this will help someone who gets the same error.
Below is the full error message:
The development server returned response error code:404 Cannot find
entry file node_modules/react-native-scripts/build/bin/crna-entry.js
in any of the roots:
while runing react native giving error
File 'C:\Users\inbox\AppData\Local\Android\platform-tools\adb.exe'
specified for property 'adbExe' does not exist. while adb.exe exist
in path C:\Users\inbox\AppData\Local\Android\Sdk\platform-tools
what is the solution for above problem?
I hit this same issue...
Notice that these two paths actually are not the same:
C:\Users\inbox\AppData\Local\Android\platform-tools\adb.exe
C:\Users\inbox\AppData\Local\Android\Sdk\platform-tools\adb.exe
To fix this, I just created a new folder "platform-tools" at 'C:\Users\inbox\AppData\Local\Android\' and then moved the files adb.exe, AdbWinApi.dll, Adb.WinUsbApi.dll into that folder.
Hope this helps.
May be you forgot to add path of adb in SystemsVariable so add adb path
Here is the guide for How to Add Adb path
i m using XCode 6.3.2 OX Version 10.10.3
The session's status is FAILED and the error description is failed to open ssh session (16)
error itms-90022 missing required icon file. 120X120px
error itms-90023 missing required icon file. 76X76px
error itms-90023 missing required icon file. 152X152px
i my resource/icon folder abouve three icons are exists. but application loader showing these error.
how can i solve it.
Regard's
Shahid Mahmood Khawaja
Its very easy to solve it
You need too have the correct name of the icon files
try to create your icons by this web site
or only change the name of icons to
appicon-76#2x.png
and
appicon-60#2x.png
Good luck :)
I have met this problem in Xcode 7.
When I check the Apple official documentation for the app icon:
https://developer.apple.com/library/ios/qa/qa1686/_index.html
I checked very icon and the exactly size,I have set all we can set the icon,and then clean the project and rebuild it,archive it for app store,I have solved this problem at last.