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 #621
执行yarn android
报错
yarn run v1.22.11
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 945 file(s) to forward-jetify. Using 12 workers...
info JS server already running.
info Installing the app...
What went wrong:
Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.6.10'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Included Builds (None of the included builds contain this plugin)
Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10')
Searched in the following repositories:
MavenRepo
Google
Gradle Central Plugin Repository
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.
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
What went wrong:
Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.6.10'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Included Builds (None of the included builds contain this plugin)
Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10')
Searched in the following repositories:
MavenRepo
Google
Gradle Central Plugin Repository
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/native/test1/node_modules/execa/index.js:174:9)
at /Users/native/test1/node_modules/execa/index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:95:5)
at async runOnAllDevices (/Users/native/test1/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/native/test1/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.
请描述完整的环境/版本信息
请在命令行的项目目录中运行npx react-native info命令,并将其输出结果粘贴到这里。
System:
OS: macOS 12.1
CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz
Memory: 864.29 MB / 32.00 GB
Shell: 5.8 - /bin/zsh
Binaries:
Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node
Yarn: 1.22.11 - /usr/local/bin/yarn
npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm
Watchman: 2022.05.30.00 - /usr/local/bin/watchman
Managers:
CocoaPods: 1.10.1 - /usr/local/bin/pod
SDKs:
iOS SDK: Not Found
Android SDK:
API Levels: 23, 26, 28, 29, 30
Build Tools: 23.0.1, 26.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.3
System Images: android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom_64, android-28 | Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom
Android NDK: Not Found
IDEs:
Android Studio: 4.2 AI-202.7660.26.42.7351085
Xcode: /undefined - /usr/bin/xcodebuild
Languages:
Java: 1.8.0_341 - /usr/bin/javac
npmPackages:
@react-native-community/cli: Not Found
react: 18.0.0 => 18.0.0
react-native: 0.69.2 => 0.69.2
react-native-macos: Not Found
npmGlobalPackages:
react-native: Not Found
请按以下格式提供问题的相关信息。
问题的具体描述
FAILURE: Build failed with an exception.
Where: Build file '/Users/native/test1/node_modules/react-native-gradle-plugin/build.gradle.kts' line: 11
What went wrong: Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.6.10'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Included Builds (None of the included builds contain this plugin)
Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10') Searched in the following repositories: MavenRepo Google Gradle Central Plugin Repository
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 11s
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/native/test1/node_modules/react-native-gradle-plugin/build.gradle.kts' line: 11
What went wrong: Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.6.10'] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Included Builds (None of the included builds contain this plugin)
Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10') Searched in the following repositories: MavenRepo Google Gradle Central Plugin Repository
Try:
Get more help at https://help.gradle.org
BUILD FAILED in 11s
info Run CLI with --verbose flag for more details. error Command failed with exit code 1.
请描述完整的环境/版本信息
npx react-native info
命令,并将其输出结果粘贴到这里。 System: OS: macOS 12.1 CPU: (12) x64 Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz Memory: 864.29 MB / 32.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 14.17.0 - ~/.nvm/versions/node/v14.17.0/bin/node Yarn: 1.22.11 - /usr/local/bin/yarn npm: 6.14.13 - ~/.nvm/versions/node/v14.17.0/bin/npm Watchman: 2022.05.30.00 - /usr/local/bin/watchman Managers: CocoaPods: 1.10.1 - /usr/local/bin/pod SDKs: iOS SDK: Not Found Android SDK: API Levels: 23, 26, 28, 29, 30 Build Tools: 23.0.1, 26.0.3, 28.0.3, 29.0.2, 29.0.3, 30.0.3 System Images: android-26 | Intel x86 Atom_64, android-26 | Google APIs Intel x86 Atom_64, android-28 | Intel x86 Atom_64, android-29 | Intel x86 Atom_64, android-29 | Google APIs Intel x86 Atom, android-29 | Google Play Intel x86 Atom, android-30 | Google APIs Intel x86 Atom Android NDK: Not Found IDEs: Android Studio: 4.2 AI-202.7660.26.42.7351085 Xcode: /undefined - /usr/bin/xcodebuild Languages: Java: 1.8.0_341 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 18.0.0 => 18.0.0 react-native: 0.69.2 => 0.69.2 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found预期结果