vendredi 26 juillet 2019

Error in .java that cannot be resolved after changing in gradle android

App works fine till yesterday but today when I opened the project, I get error only in .java

In a class, only in .java I get error as unresolved error java.

 intent = Intent(this@UserImageActivity, UserDetailsActivity::class.java)

I used invalidate cache and restart but still I couldn't resolve the compile error.

  build.gradle (app)

    dependencies {
        implementation fileTree(dir: 'libs', include: ['*.jar'])
        implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
       }

     build.gradle (AppProject)

     buildscript {
        ext.kotlin_version = '1.3.11'
        repositories {
            google()
            jcenter()
        }
        dependencies {
            classpath 'com.android.tools.build:gradle:3.2.1'
            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
        }
    }

build.gradle (app)

implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"

enter image description here





Aucun commentaire:

Enregistrer un commentaire