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 :)
Related
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 am running a react-native application on Mac. but I am getting "RNCSafeAreaView" was not found in the UIManager.
update version of this module by typing following command in terminal:
npm install react-native-safe-area-context#1.0.2
it will solve this problem
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.
I create a react native app in C9. Now, I want to develop this app on my local machine with android settings. I downloaded the project.
cd myProjectFolder
react-native start
npm install
react-native run-android
Also, I add a project name in package.json.
The error is below:
error Android project not found. Are you sure this is a React Native project?
If android project/folder does not exit in your root project then run :
react-native eject
I encountered this issue after I ruan ./gradlew clean. Tried serval methods but vain. Then I ran ./gradlew in the Android directory. It worked for me.
// Android
./gradlew
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.