Эта ошибка появляется при запуске моего проекта:
Не удалось скомпилировать файл сборки «H:\StartActivity\build.gradle».
Ошибка запуска:
файл сборки «H:\StartActivity\build.gradle»: 28: только buildscript {} и другие блоки сценариев плагинов {} разрешены перед блоками плагинов {}, никакие другие операторы не используются. разрешено
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
ext.kotlin_version = "1.5.0-release-764"
repositories {
google()
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.2.0"
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
jcenter() // Warning: this repository is going to shut down soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
plugins {
id 'org.jetbrains.kotlin.jvm' version '1.5.0-release-764'
}
repositories {
mavenCentral()
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
}
compileKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
compileTestKotlin {
kotlinOptions {
jvmTarget = "1.8"
}
}
Подробнее здесь: https://stackoverflow.com/questions/674 ... ot-compile