Gặp lỗi khi build android
"react-native": "0.68.2",
"react-native-momosdk": "^1.4.3",
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
Note: /Users/tungxuan/Projects/ReactNative/tngo/node_modules/react-native-gradle-plugin/src/main/java/com/facebook/react/codegen/generator/SchemaJsonParser.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
What went wrong:
A problem occurred evaluating project ':react-native-momosdk'.
Could not find method compile() for arguments [com.facebook.react:react-native:+] on object of type org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler.
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.
at makeError (/Users/tungxuan/Projects/ReactNative/tngo/node_modules/execa/index.js:174:9)
at /Users/tungxuan/Projects/ReactNative/tngo/node_modules/execa/index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (/Users/tungxuan/Projects/ReactNative/tngo/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/tungxuan/Projects/ReactNative/tngo/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.
Gặp lỗi khi build android "react-native": "0.68.2", "react-native-momosdk": "^1.4.3",
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 Note: /Users/tungxuan/Projects/ReactNative/tngo/node_modules/react-native-gradle-plugin/src/main/java/com/facebook/react/codegen/generator/SchemaJsonParser.java uses or overrides a deprecated API. Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build failed with an exception.
Where: Build file '/Users/tungxuan/Projects/ReactNative/tngo/node_modules/react-native-momosdk/android/build.gradle' line: 34
What went wrong: A problem occurred evaluating project ':react-native-momosdk'.
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 18s
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.