Я создал новый проект, используя react-native 0.63, и когда я запускаю симулятор ios, все работает нормально, но при попытке запустить его на android он не работает и выдает эту ошибку
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:installDebug'.
> SDK location not found. Define location with an ANDROID_SDK_ROOT environment variable or by setting the sdk.dir path in your project's local properties file at '/Volumes/SSD2/developer/MyProject/AwesomeProject/android/local.properties'.
* 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 2s
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: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
я устанавливаю response-native, например react-native Настройка
, и это результат моего доктора
✓ Node.js
✓ npm
✓ Watchman - Used for watching changes in the filesystem when in development mode
Android
✓ JDK
✓ Android Studio - Required for building and installing your app on Android
✖ Android SDK - Required for building and installing your app on Android
- Versions found: N/A
- Version supported: 29.0.2
✖ ANDROID_HOME
iOS
✓ Xcode - Required for building and installing your app on iOS
✓ CocoaPods - Required for installing iOS dependencies
✓ ios-deploy - Required for installing your app on a physical device with the CLI
Errors: 2
Warnings: 0
и если я запускаю npx response-native start, тогда приложение запускается из студии android без проблем.
Редактировать, если я запускаю проект из источника терминала .bash_profile
запуск эмулятора, но проект не запускается
"--no-jetifier" flag.
Jetifier found 5194 file(s) to forward-jetify. Using 12 workers...
info JS server already running.
info Installing the app...
env: sh\r: No such file or directory
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: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
env: sh\r: No such file or directory