react-native-graph
react-native-graph copied to clipboard
Problem running example
Hi @mrousavy , tried to run the example that is in the repository, but I get the following error:
yarn run v1.22.4
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 984 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/Username/Desktop/react-native-graph/example/android/app/build.gradle' line: 151
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'nativeArchitectures' for BuildType_Decorated{name=debug, debuggable=true, testCoverageEnabled=false, jniDebuggable=false, pseudoLocalesEnabled=false, renderscriptDebuggable=false, renderscriptOptimLevel=3, minifyEnabled=false, zipAlignEnabled=true, signingConfig=SigningConfig_Decorated{name=debug, storeFile=/Users/Username/Desktop/react-native-graph/example/android/app/debug.keystore, storePassword=android, keyAlias=androiddebugkey, keyPassword=android, storeType=jks, v1SigningEnabled=true, v2SigningEnabled=true, enableV1Signing=null, enableV2Signing=null, enableV3Signing=null, enableV4Signing=null}, embedMicroApp=false, mBuildConfigFields={}, mResValues={react_native_dev_server_port=com.android.builder.internal.ClassFieldImpl@99240943, react_native_inspector_proxy_port=com.android.builder.internal.ClassFieldImpl@44d408ec}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}} of type com.android.build.gradle.internal.dsl.BuildType.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/Username/Desktop/react-native-graph/example/android/app/build.gradle' line: 151
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not get unknown property 'nativeArchitectures' for BuildType_Decorated{name=debug, debuggable=true, testCoverageEnabled=false, jniDebuggable=false, pseudoLocalesEnabled=false, renderscriptDebuggable=false, renderscriptOptimLevel=3, minifyEnabled=false, zipAlignEnabled=true, signingConfig=SigningConfig_Decorated{name=debug, storeFile=/Users/Username/Desktop/react-native-graph/example/android/app/debug.keystore, storePassword=android, keyAlias=androiddebugkey, keyPassword=android, storeType=jks, v1SigningEnabled=true, v2SigningEnabled=true, enableV1Signing=null, enableV2Signing=null, enableV3Signing=null, enableV4Signing=null}, embedMicroApp=false, mBuildConfigFields={}, mResValues={react_native_dev_server_port=com.android.builder.internal.ClassFieldImpl@99240943, react_native_inspector_proxy_port=com.android.builder.internal.ClassFieldImpl@44d408ec}, mProguardFiles=[], mConsumerProguardFiles=[], mManifestPlaceholders={}} of type com.android.build.gradle.internal.dsl.BuildType.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 4s
at makeError (/Users/Username/Desktop/react-native-graph/example/node_modules/execa/index.js:174:9)
at /Users/Username/Desktop/react-native-graph/example/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/Username/Desktop/react-native-graph/example/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/Username/Desktop/react-native-graph/example/node_modules/@react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
I had to change the gradle version from gradle-6.2-all
to gradle-6.7.1-all
, because before I got the following error:
yarn run v1.22.4
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 984 file(s) to forward-jetify. Using 8 workers...
info JS server already running.
info Installing the app...
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/Username/Desktop/react-native-graph/example/android/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 6.7.1. Current version is 6.2. If using the gradle wrapper, try editing the distributionUrl in /Users/Username/Desktop/react-native-graph/example/android/gradle/wrapper/gradle-wrapper.properties to gradle-6.7.1-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/Username/Desktop/react-native-graph/example/android/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin [id 'com.android.internal.version-check']
> Minimum supported Gradle version is 6.7.1. Current version is 6.2. If using the gradle wrapper, try editing the distributionUrl in /Users/Username/Desktop/react-native-graph/example/android/gradle/wrapper/gradle-wrapper.properties to gradle-6.7.1-all.zip
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
* Get more help at https://help.gradle.org
BUILD FAILED in 5s
at makeError (/Users/Username/Desktop/react-native-graph/example/node_modules/execa/index.js:174:9)
at /Users/Username/Desktop/react-native-graph/example/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/Username/Desktop/react-native-graph/example/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/Username/Desktop/react-native-graph/example/node_modules/@react-native-community/cli/build/index.js:192:9)
info Run CLI with --verbose flag for more details.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
What am I doing wrong?
Ah whoops, I actually never tested the Android example here. The example app's setup is maybe a bit wrong...
@mrousavy : Could you test it and let me know?
What should I test?
@mrousavy : If by chance the project works for you by running it on an android device.
- To test the code, I had to create a new project.
- Remove the following lib which gives me problems with the grandle
react-native-static-safe-area-insets
as it is also a lib that has not been updated for more than two years.
P.s.
When I try to disable the gesture
, the app crashes and I get the following error:
ERROR Error: [react-native-gesture-handler] You cannot change the thread the callbacks are ran on while the app is running
If by chance the project works for you by running it on an android device.
It doesn't, that's what I was saying. I extracted this component from a private production app, it works there.
When I try to disable the gesture, the app crashes and I get the following error:
I know, RNGH bug.
If by chance the project works for you by running it on an android device.
It doesn't, that's what I was saying. I extracted this component from a private production app, it works there.
When I try to disable the gesture, the app crashes and I get the following error:
I know, RNGH bug.
Maybe it should be mentioned somewhere that as-is, the package isn't working on Android.
Hello guys, any solution for Android so far?
This package doesn't work at all on Android. You guys should state that somewhere. Even the example app cannot be started, having the same issue. Extremely disappointing, such a great package yet it doesn't work.
This package doesn't work at all on Android. You guys should state that somewhere. Even the example app cannot be started, having the same issue. Extremely disappointing, such a great package yet it doesn't work.
I just ran yarn android
in example/
and it built fine:
I am also using react-native-graph in a client app for Android and it works fine.