gpt4 book ai didi

android-studio - 错误 :(1, 0) 未找到 ID 为 'kotlin-android-extensions' 的插件

转载 作者:行者123 更新时间:2023-12-03 08:45:13 27 4
gpt4 key购买 nike

apply plugin: 'kotlin-android-extensions'.

当我在 android studio 预览中添加这个扩展时,给我这个错误
“错误:(1, 0) 未找到 ID 为 'kotlin-android-extensions' 的插件。”。

我的构建等级
   apply plugin: 'com.android.application'

android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.example.mohamed_elbaz.myapplication"
minSdkVersion 15
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}

dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.2'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}

最佳答案

To use the plugin, you have to add it in your root build.gradle file


buildscript {
ext.kotlin_version = '1.1.60'
repositories {
jcenter()
maven {
url 'https://maven.google.com'
}
}

dependencies {
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}

关于android-studio - 错误 :(1, 0) 未找到 ID 为 'kotlin-android-extensions' 的插件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46101908/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com