Open 5paun opened 3 years ago
Hello,
Try to run that command with npx
, i.e.:
npx react-native run-android
Also, do you manage to build the empty project, i.e. the project where there is no our SDK?
According to the provided error, it seems that you haven't installed the React Native environment.
Yes, I tried to run with npx and without. On different versions of node.js, 11 and 12 other projects and new ones work without problems. If launched through android studio, it produces the following:
E / unknown: ReactNative: ReactInstanceManager.createReactContext: mJSIModulePackage null E / ReactNativeJNI: logMarker CREATE_REACT_CONTEXT_END E / unknown: ReactNative: Exception in native call java.lang.RuntimeException: Unable to load script. Make sure you're either running a Metro server (run 'react-native start') or that your bundle 'index.android.bundle' is packaged correctly for release. at com.facebook.react.bridge.CatalystInstanceImpl.jniLoadScriptFromAssets (Native Method) at com.facebook.react.bridge.CatalystInstanceImpl.loadScriptFromAssets (CatalystInstanceImpl.java:234) at com.facebook.react.bridge.JSBundleLoader $ 1.loadScript (JSBundleLoader.java:29) at com.facebook.react.bridge.CatalystInstanceImpl.runJSBundle (CatalystInstanceImpl.java:258) at com.facebook.react.ReactInstanceManager.createReactContext (ReactInstanceManager.java:1293) at com.facebook.react.ReactInstanceManager.access $ 1100 (ReactInstanceManager.java:131) at com.facebook.react.ReactInstanceManager $ 5.run (ReactInstanceManager.java:1016) at java.lang.Thread.run (Thread.java:764)
As if it does not detect that the server is running.
By the way, when I cloned the repository, I had to go to the developer branch. Since there was nothing in the master. Did I do it right?
@5paun The correct branch is develop
as you have mentioned.
The issue is that the gradlew
file in the android
directory does not have executable permission.
You can grant executable permission by running chmod +x gradlew
in the example/android
directory if you are on OSX/Linux.
After this step, running npx react-native run-android
should work.
@vyakimchik Maybe you could push a commit changing the permission on that file or maybe add this in the documentation.
@peterlazar1993 Ok, I'll mark this in the README of this repository.
Thanks!
@5paun yes. As the Face SDK for React Native is still in development and has not been released yet and you want to try how it works, you need to use the develop
branch.
Greetings! I cannot start your demo version of the application when I run react-native run-android command, I get the following error:
Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details. Error: spawn ./gradlew EACCES at Process.ChildProcess._handle.onexit (internal/child_process.js:264:19)
help please solve the problem