When I add kotlin to the list of plugins in my pro...
# compose
m
When I add kotlin to the list of plugins in my project as per this doc, I get this error: (The rest in the thread)
a
kotlin-android
and
org.jetbrains.kotlin.android
are the same plugin so you only need one. Also you might have already specified the version in your project level
build.gradle
so you can't specify the version here.
🙏 1
Also please put long messages in the thread.
1
m
Copy code
Build file '/home/user/src/project/app/build.gradle' line: 5

Error resolving plugin [id: 'org.jetbrains.kotlin.android', version: '1.4.30']
> Plugin request for plugin already on the classpath must not include a version

* Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Exception is:
org.gradle.api.GradleException: Error resolving plugin [id: 'org.jetbrains.kotlin.android', version: '1.4.30']
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:207)
....
Caused by: org.gradle.plugin.management.internal.InvalidPluginRequestException: Plugin request for plugin already on the classpath must not include a version
	at org.gradle.plugin.use.resolve.internal.AlreadyOnClasspathPluginResolver.resolve(AlreadyOnClasspathPluginResolver.java:62)
	at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:204)
	... 144 more
Here's the plugins list:
Copy code
plugins {
    id 'com.android.application'
    id 'kotlin-android'
    id 'kotlin-kapt'
    id 'org.jetbrains.kotlin.android' version '1.4.30'
}
What does this mean? As a side note, the project was working fine before adding the last line. So, is it something unnecessary mentioned in the docs?
@Albert Chang does using kotlin-gradle-plugin in the project-level build.gradle imply declaring kotlin support for the project so we don't need to include a separate kotlin plugin declaration?
a
No, you need the declaration, just without specifying the version.
🙏 1