Android: Could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10'
See original GitHub issueDescription
I am getting Kotline related error.
~/Personal/Github/event_tickets via v16.14.2 via 💎 v2.6.3
❯ yarn android
yarn run v1.22.18
$ react-native run-android
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 936 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/sworup/Personal/Github/event_tickets/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:
> 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 6s
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/sworup/Personal/Github/event_tickets/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:
> 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 6s
at makeError (/Users/sworup/Personal/Github/event_tickets/node_modules/execa/index.js:174:9)
at /Users/sworup/Personal/Github/event_tickets/node_modules/execa/index.js:278:16
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async runOnAllDevices (/Users/sworup/Personal/Github/event_tickets/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:109:5)
at async Command.handleAction (/Users/sworup/Personal/Github/event_tickets/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 see that in base level build.gradle react-native adds dependency
dependencies {
classpath("com.android.tools.build:gradle:7.0.4")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("de.undercouch:gradle-download-task:4.1.2")
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
The react-native-gradle-plugin
adds kotlin("jvm") version "1.6.10"
plugin with build.gradle.kts.
I might not have exact 1.6.10 version of kotline in my system. Also I cannot downgrade as it is not compatible with my android-studio version.
I am on Mac M1. IOS builds fine.
Version
0.68.1
Output of npx react-native info
System: OS: macOS 11.6.2 CPU: (8) arm64 Apple M1 Memory: 131.64 MB / 16.00 GB Shell: 5.8 - /bin/zsh Binaries: Node: 16.14.2 - ~/.nvm/versions/node/v16.14.2/bin/node Yarn: 1.22.18 - ~/.yarn/bin/yarn npm: 8.5.0 - ~/.nvm/versions/node/v16.14.2/bin/npm Watchman: 2022.03.21.00 - /opt/homebrew/bin/watchman Managers: CocoaPods: 1.11.3 - /opt/homebrew/bin/pod SDKs: iOS SDK: Platforms: DriverKit 21.2, iOS 15.2, macOS 12.1, tvOS 15.2, watchOS 8.3 Android SDK: API Levels: 29, 32 Build Tools: 29.0.1, 29.0.2, 29.0.3, 32.0.0, 32.1.0 System Images: android-29 | ARM 64 v8a, android-29 | Intel x86 Atom_64, android-29 | Google APIs ARM 64 v8a, android-29 | Google APIs Intel x86 Atom_64 Android NDK: Not Found IDEs: Android Studio: 2021.1 AI-211.7628.21.2111.8139111 Xcode: 13.2.1/13C100 - /usr/bin/xcodebuild Languages: Java: 11.0.14.1 - /usr/bin/javac npmPackages: @react-native-community/cli: Not Found react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 react-native-macos: Not Found npmGlobalPackages: react-native: Not Found
Steps to reproduce
Try to build the application first time with
yarn android
Snack, code example, screenshot, or link to a repository
No response
Issue Analytics
- State:
- Created a year ago
- Comments:6 (3 by maintainers)
Top GitHub Comments
Is there a solution to this, please? If so, would you mind telling me?
Nope there is no “solution” as the original author hasn’t followed up. Please open a new issue, provide a reproducer and we’ll be able to support there.