question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Android: Could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.jetbrains.kotlin.jvm.gradle.plugin:1.6.10'

See original GitHub issue

Description

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:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
Hehejie1commented, Jul 26, 2022

Is there a solution to this, please? If so, would you mind telling me?

0reactions
cortinicocommented, Aug 19, 2022

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Plugin [id: 'org.jetbrains.kotlin.jvm', version: '1.2.71'] was not ...
Gradle Core Plugins (plugin is not in 'org.gradle' namespace); Plugin Repositories (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm: ...
Read more >
Plugin: org.jetbrains.kotlin.jvm
Using the plugins DSL: plugins { id "org.jetbrains.kotlin.jvm" version "1.8.0-RC2" }. Using legacy plugin application: buildscript { repositories { maven ...
Read more >
Kotlin version conflict when using Kotlin Gradle plugins in pre ...
But now I want to apply the org.jetbrains.kotlin.js plugin in version 1.4.0 . ... w: Runtime JAR files in the classpath should have...
Read more >
org.jetbrains.kotlin : kotlin-gradle-plugin : 1.6.10 - Maven Central
Home page, https://kotlinlang.org/. Source code, https://github.com/JetBrains/kotlin. Developers ... org.jetbrains.kotlin:kotlin-gradle-plugin 1.6.10.
Read more >
Issue with org.jetbrains.kotlin.jvm
Hello I have issus with org.jetbrains.kotlin.jvm When I run it in ... (could not resolve plugin artifact 'org.jetbrains.kotlin.jvm:org.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found