Как исправить проблемы совместимости с плагином Gradle org.jetbrains.kotlin.android? «Плагин Gradle с его изяществом KotAndroid

Форум для тех, кто программирует под Android
Ответить
Anonymous
 Как исправить проблемы совместимости с плагином Gradle org.jetbrains.kotlin.android? «Плагин Gradle с его изяществом Kot

Сообщение Anonymous »

Я использую Kotlin и Gradle, и у меня есть этот код приложения buildgradle:

Код: Выделить всё

plugins {
id 'com.android.application'
id 'com.google.gms.google-services'
id("org.jetbrains.kotlin.android") version "1.8.20"
}

android {
namespace 'com.example.loginregisterapp'
compileSdk 33

defaultConfig {
applicationId "com.example.loginregisterapp"
minSdk 24
targetSdk 33
versionCode 1
versionName "1.0"

testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}

buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = '1.8'
}
buildFeatures {
viewBinding = true
}
}

dependencies {

implementation 'androidx.core:core-ktx:1.10.1'
implementation 'androidx.appcompat:appcompat:1.6.1'
implementation 'com.google.android.material:material:1.9.0'
implementation 'androidx.constraintlayout:constraintlayout:2.1.4'
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.5'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1'
implementation "io.reactivex.rxjava2:rxjava:2.2.19"
implementation "com.jakewharton.rxbinding2:rxbinding:2.0.0"
implementation platform('com.google.firebase:firebase-bom:32.0.0')
}type here
А это мой build.gradle (проект):

Код: Выделить всё

buildscript {
ext.kotlin_version = '1.8.20'
repositories {
// Make sure that you have the following two repositories
google()  // Google's Maven repository
mavenCentral()  // Maven Central repository

}

dependencies {
// Add the dependency for the Google services Gradle plugin
classpath 'com.google.gms:google-services:4.3.15'
classpath "com.android.tools.build:gradle:8.0.1"
classpath "com.google.gms:google-services:4.3.15"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}

}

task clean (type: Delete){
delete rootProject.buildDir
}
Вот проблема, с которой я столкнулся:

Код: Выделить всё

Build file 'C:\Users\Gebruiker\Desktop\loginregisterapp\app\build.gradle' line: 4

Error resolving plugin [id: 'org.jetbrains.kotlin.android', version: '1.8.20']
> The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.
Как это решить?


Подробнее здесь: https://stackoverflow.com/questions/763 ... in-android
Ответить

Быстрый ответ

Изменение регистра текста: 
Смайлики
:) :( :oops: :roll: :wink: :muza: :clever: :sorry: :angel: :read: *x)
Ещё смайлики…
   
К этому ответу прикреплено по крайней мере одно вложение.

Если вы не хотите добавлять вложения, оставьте поля пустыми.

Максимально разрешённый размер вложения: 15 МБ.

Вернуться в «Android»