Reputation: 1064
I am not using kotlin in my program, it was working fine unless I update the target version from 26 to 28. I don't know a bit about kotlin. whenever i am trying to sync the gradle files it gives an error :
org.jetbrains.kotlin.gradle.KotlinGradleModel.getImplements()Ljava/util/List;
Why it is happening so ?
My gradle file is :
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.pr20020897.dms"
minSdkVersion 21
targetSdkVersion 28
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:28.0.0-alpha1'
implementation 'com.android.support.constraint:constraint-layout:1.0.2'
testImplementation 'junit:junit:4.12'
implementation 'com.android.support:design:28.0.0-alpha1'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}
Project level gradle :
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
I think, there is something wrong with android studio itself because I tried to create new project but in that also i am getting the same error.
Upvotes: 3
Views: 8871
Reputation: 16976
First, try to update your gradle to:
classpath 'com.android.tools.build:gradle:3.2.0'
And in your dependencies, use the stable version:
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
Since you said you're not using kotlin, Updating the kotlin plugin will help
Go to: File -> Settings -> Plugins
do update the kotlin then restart.
Upvotes: 1