after i add react native video package to my project i could'nt build the project. my rn version is 0.60.3 i have installed latest version of react-native-video . the error is
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.android.support:support-media-compat:28.0.0.
Searched in the following locations:
- file:/C:/Users/avajang-pc/.m2/repository/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.pom
- file:/C:/Users/avajang-pc/.m2/repository/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.jar
- file:/C:/Users/avajang-pc/Desktop/newSpoc/spocplus/node_modules/react-native/android/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.pom
- file:/C:/Users/avajang-pc/Desktop/newSpoc/spocplus/node_modules/react-native/android/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.jar
- file:/C:/Users/avajang-pc/Desktop/newSpoc/spocplus/node_modules/jsc-android/dist/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.pom
- file:/C:/Users/avajang-pc/Desktop/newSpoc/spocplus/node_modules/jsc-android/dist/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.jar
- https://dl.google.com/dl/android/maven2/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.pom
- https://dl.google.com/dl/android/maven2/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.jar
- https://jcenter.bintray.com/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.pom
- https://jcenter.bintray.com/com/android/support/support-media-compat/28.0.0/support-media-compat-28.0.0.jar
Required by:
project :app > project :react-native-video
i've added maven , i changed the gradle version, build tools version.
Try running this command, react-native 0.60 now uses androidX and not all libraries are update to support it (one of them is react-native-video):
npm install --save-dev jetifier && npx jetify && react-native run-android
Related
i am using react-native with expo to run my app on my android devices when i load my app on my terminal i have this error
Some dependencies are incompatible with the installed expo package version:
#react-native-community/masked-view - expected version: 0.1.10 - actual version installed: 0.1.11
Your project may not work correctly until you install the correct versions of the packages.
To install the correct versions of these packages, please run: expo install [package-name ...]
Missing package "metro-config" in the project at: C:\Users\kabore\Desktop\react_native\app1
This usually means react-native is not installed. Please verify that dependencies in package.json include "react-native" and run yarn or npm install.
Error: Missing package "metro-config" in the project at: C:\Users\kabore\Desktop\react_nativ
simply remove the node_modules folder and run yarn install or npm install in the command line to install dependencies again .it seems like some of your dependencies are not installed correctly
I'm using react-native-gesture-handler within react-navigation and getting this error
null is not an object ( evaluating 'RNGestureHandlerModule.Direction')
Workspace file is automatically created with new React native version(0.60). And there is no libraries under libraries folder in Xcode project.
I created new project in react native and new project created with react-native version 0.60 automatically. Then I installed following dependencies
npm install —save react-navigation
npm install —save react-native-gesture-handler
After installing I am getting runtime error
null is not an object ( evaluating 'RNGestureHandlerModule.Direction')
I also tried to manually link react-native-gesture-handler dependencies with following steps
Right Click Libraries "Add Files to Project"
/node_modules/react-native-gesture-handlers/ios/RNGestureHandler.xcodeproj
Go to build phases and add libRNGestureHandler.a
Run
After that I am getting following errors
-> File not found
-> File not found
Any suggestion for me to fix this?
Did you try using react-native link react-native-gesture-handler?
For me the solution was:
1) react-native link react-native-gesture-handler
2) cd ios
3) pod install
as now, pod is installed automatically into the project with react-native 0.60
If you use RN > 0.60 you don't have to link react-native-gesture-handler manually as it supports autolinking.
For iOS
cd ios && pod install
For further info see issue #671
Please try to link react-native-gesture-handler then fixed this error
try this command for link gesture-handler pluggin
react-native link react-native-gesture-handler
So, I used react-native init [project-name] to create one react-native project. It installed the latest version of native, 0.60. Then I installed react-native-app-auth.
After than I started the metro server using react-native start.
But when I ran react-native run-android, the compiler gave me some errors.
Task :react-native-app-auth:compileDebugJavaWithJavac FAILED
Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
I've tried to link it manually using react-native link react-native-app-auth.
Don't have any code. It's just some simple configuration.
I expect it to run smoothly, without any errors.
I am getting error after running react-native run-android
https://gist.github.com/ElavanResu/4555dc94f460681aaf051c2a3852effa
You can try to jetify the node_modules until react-native-app-auth updates his repository making it compatible with RN 0.60.
1) npm install --save-dev jetifier
2) npx jetify
3) npx react-native run-android
4) npx jetify
as said in: https://facebook.github.io/react-native/blog/2019/07/03/version-60#androidx-support
i have a problem with react native in ubuntu, i have installed,
java jdk 8 (both javac --version) as well as echo $JAVA_HOME gives the proper output.
I have also installed android studio and set the android environment variables as well as the tools and echo $ANDROID_HOME gives output of the sdk location.
I have also installed gradle version 4.4.
I am unable to start the android app using react-native run-android. can any one let me know if i have missed something during installation.
And react-native as well as android studio works fine as I am currently using react-native start to start the metro builder as well as the other react-native cli commands. also android studio and gradle is also able to generate debug as well as release apks with no problems.
The error i get,
Scanning folders for symlinks in /home/igate-naveed/Documents/ReactNative/mobile-app-android/node_modules (16ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/getting-started.html
First of all you need to create a project like this:
react-native init myProjectName
Then, start an emulator from Android Studio... Afterwards:
npm install && npm start
in your project directory, and from another terminal, inside your project directory, run :
react-native run-android
Is this working?
Instead of using the npm install manager, I used yarn and it worked for me. In your project directory, just do:
(project-directory)$ yarn
Update the gradle version.
Create new project:
react-native init projectname
Uninstall the npm pack.
Reinstall the npm pack again.
npm start
react-native start
react-native run-android
I searched for this error on the git repo and online but I didn't find anything what brings me to here. React native is totally new for me so if I missed something stupid, my apologize.
I'm trying to install & link react-native-fbsdk in my react-native project: https://github.com/facebook/react-native-fbsdk
I went through these steps:
react-native init [YourApp]
Result: done, project created
react-native install react-native-fbsdk
Output: Scanning 712 folders for symlinks in C:\wamp\www\chatapp\node_modules (26ms)
rnpm-install info Module react-native-fbsdk has been successfully installed & linked
react-native link react-native-fbsdk
Output: Scanning 712 folders for symlinks in C:\wamp\www\chatapp\node_modules (29ms)
{ [Error: Cannot find module 'C:\wamp\www\chatapp\node_modules\react-native-fbsdk\package.json'] code: 'MODULE_NOT_FOUND' }
Print screen:
Of course when I try to build my app with react-native run-android I got this:
...
:app:processDebugResources
:app:generateDebugSources
:app:processDebugJavaRes UP-TO-DATE
:app:compileDebugJavaWithJavac
C:\wamp\www\chatapp\android\app\src\main\java\com\chatapp\MainApplication.java:16: error: cannot find symbol
import com.facebook.FacebookSdk;
...
More Info:
React native version: 0.42.3
npm -version 4.2.0
I didn't find "react-native-fbsdk" folder under
my node_modules folder.
Windows 8.1
I'm working with Android Studio
Android SDK Platform-Tools 25.0.4
Android SDK Tools 25.2.3
Thank you in advance.
Leo.
EDIT + UPDATE: Added react-native tag. Facebook team investigated this and it looks like an issue with React Native itself.
https://developers.facebook.com/bugs/1889723254644374
After few days with the community I found the problem!
This line is not valid commend for react native!
react-native install react-native-fbsdk
Instead we need to write:
npm i -S react-native-fbsdk
and then
react-native link react-native-fbsdk