as I explained in a previous question, I'm new in the React-Native world.
I'm developing an app just to prove my skills and everything seems to be good, but today I tried to deal with react-navigation.
So I followed the various steps (https://reactnavigation.org/docs/en/getting-started.html) :
React-navigation installation : npm install --save react-navigation
Gesture handler installation: npm install --save react-native-gesture-handler
Modifications of MainActivity.java.
Anyway, when I try to install the app with the comand react-native run-android
I get this error:
P.S. I've already had a problem with react-navigation before, so I decided to follow many suggestion posted by people having here in StackOverflow and I try to unistall and re-install react-navigation, then to link modules...etc. But I think I made things worse.
React version is 0.60.
Solutions ? Thank you in advance
I've made it work in my project, you can use these command to make it run, then wait for a release from the mainteners:
1) npm install --save-dev jetifier
2) npx jetify
3) npx react-native run-android
4) npx jetify
Note that this is a workaround until they update the lib.
Related
Till few hours ago expo eject was working completely fine. Suddenly it has started throwing error.
Things to consider:
I recently updated to Node v16 and npm v8.
Tried uninstall expo-cli, re-installing, downgrading, upgrading.
To install packages I have to run npm with flag --legacy-peer-deps. But, most likely it's because I have npm above v8 and few packages uses v6 or below (Found this online).
Versions:
Node - 16.16.0
npm - 8.14.0
expo - 5.4.12
Link to the error screenshot
P.S. - I am new to posting questions on Stackoverflow.
Looks like your dependencies are not getting located. Try running yarn install this might solve the problem.
I'm trying to run project on React Native using command expo run:android. Connected an android device.
Build successful. Then I get this message in console
BUILD SUCCESSFUL in 30s 294 actionable tasks: 2 executed, 292
up-to-date
Dev Client: No common URI schemes could be found for the native iOS
and Android projects, this is required for opening the project
Add a common scheme with npx uri-scheme add my-scheme or provide a
scheme with the --scheme flag
You can see all of the existing schemes for your native projects by
running npx uri-scheme list
Starting Metro Bundler
No scheme specified for development client
Check URI schemes by npx uri-scheme list
› iOS: Schemes for config: ./ios\DogSafeProject\Info.plist
› Android: Schemes for config:
./android\app\src\main\AndroidManifest.xml
Please help me!
I was having the same issue and running this script in my terminal got the job done.
npx uri-scheme add <app name>.
That happened to me as well after upgrading dependencies in package.json.
You need to add uri-scheme package to your project with npm install uri-scheme, then recreate Android and iOS projects with expo eject. You may need to remove those directories and perform clean expo eject if still having error after install. After that expo run:android should work again :-)
I simply updated my expo-cli using: yarn global add expo-cli or npm install -g expo-cli
I have the same issue and running this script in my terminal got the job done
yarn add expo-dev-client or
npm install expo-dev-client
For me it was because my npm start was set to "expo start --dev-client" where the flag was not supposed to be there
I learning React-Native with Windows 10, Using Git Bash Command Prompt and Android Studio Emulator.
I have Install React Native globally by using npm install -g react-native-cli, I always create Project using react-native init ProjectName and
My Project Launching Method is
go into Project Directory with Git Bash CMD and execute react-native run-android.
I notice that most of the Project in Github are older version which consist of index.android.js and index.ios.js (My Project is newer version so it only have index.js). I been trying to open some older version Project, but it seem like it just does not launch with the method I mentioned above.
I also have tried react-native start method from How to open existing project in React Native? but I still not able to launch it.
The error message when I trying to launch the project is Command unrecognized. Make sure that you have run npm install and that you are inside a react-native project. This Problem only occur when I trying to launch project from Github, when I open my own Project there is no such problem.
ps. If I try use npm install in the project directory, it will have some error.
I have try to search from Net, most of their launching method are the same as above and does not work for me, so wanna ask that:
Is my method of launching React-Native is wrong in the very beginning?
Is there anything I need to install so that I can open old version React Native Project?
How can I open this project with my current situation? https://github.com/parkerdan/SampleNavigation
Thank you.
Extra Info (React Native CLI and Node Version):
$ react-native -v
react-native-cli: 2.0.1
react-native: n/a - not inside a React Native project directory
> process.version
'v8.9.4' (Node Version)
After whole day of Searching, I have found the Solution.
Whenever open any Project from Github or any sources, we have to ensure that the we have install all the required Dependencies, as Most of the Project using different type of dependencies that you may have not ever install.
Solution:
Download project
git clone https://github.com/parkerdan/SampleNavigation.git
2. Go to the Project Directory and Install dependencies (IMPORTANT)
Note: For unknown reason, npm install does not work
npm i
or yarn i
Run Project (or any launch method that work you)
react-native run-android
After you clone your project from git and cd to project folder, make sure you run npm install before you can react-native run-android.
Today I created an (empty) Android app using the "react-native-firebase" and "native-base" packages. It works in debug mode, but in release mode crash occurs.
Steps to reproduce the problem:
Create a new app
react-native init BaseTest
cd BaseTest
Install the "native-base"
npm install native-base --save
react-native link
Install the "react-native-firebase"
https://rnfirebase.io/docs/v3.1.*/installation/initial-setup
https://rnfirebase.io/docs/v3.1.*/installation/android
Generating Signed APK
https://facebook.github.io/react-native/docs/signed-apk-android.html
Build release and install
cd android
gradlew assembleRelease
adb install app-release.apk
I could not find the error. Does anyone have any ideas?
Hi I got the same issue and it really aced my head but I managed to resolve it. So instead of running
react-native link run react-native link **native-base**.
I hope this helps. Happy coding :)
I really tried to avoid having to ask this question but I've been stuck on this for a good two days. The problem is that when I try to run the command "ionic build android" I get nothing. No error response, no warning, nothing.
I installed node.js and made my npm global so I can access it anywhere. I installed ionic and cordova via npm install and I was able to start the application and see it on the web but when I try to run it on my device, I don't get any response at all.
What am I missing? I have all the android sdks as I normally write my android applications natively. I installed Ant view homebrew. I'm quite lost.
Apparently there was a bug in Node 5.0.0 causing this.
I had the same issue as you, remedy, and was able to resolve it today by updating to the latest version of node (5.2.0 as of today):
sudo npm update -g
For some reason not (yet) known to me, the cordova command was no longer available after this update (returning "/usr/local/bin/cordova: No such file or directory"), but reinstalling cordova by calling
sudo npm install -g cordova
helped. After these two updates the ionic build ... and cordova build ... commands worked again.
So downgrading node to version 4 is apparently no longer necessary to resolve this.