skip to Main Content

I’m doing auth0 in Flutter using the auth0_flutter package after following the readme and proper configuration(android) I got a build error that says:

e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors

kotlin version issue iamge

after finding the solution on the internet i reached to the point the i need to change the Kotlin version inside the android level build.gradle file inside the build block although that block was not present there and i added manually

buildscript {
repositories {
google()
mavenCentral()
}

dependencies {
    // Add any necessary dependencies here
}
ext.kotlin_version = '1.7.1'
}

I have played with different version of the Kotlin but still getting the same error,

i have followed the read me
https://pub.dev/packages/auth0_flutter

2

Answers


  1. buildscript {
        repositories {
            google()
            mavenCentral()
        }
    
        dependencies {
            classpath 'com.android.tools.build:gradle:4.1.0' // change according to your version
            classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" ]
        }
    }
    
    allprojects {
        repositories {
            google()
            mavenCentral()
        }
    }
    
    rootProject.buildDir = '../build'
    subprojects {
        project.buildDir = "${rootProject.buildDir}/${project.name}"
    }
    
    subprojects {
        project.evaluationDependsOn(':app')
    }
    
    Login or Signup to reply.
  2. Goto, android -> build.gradle ext.kotlin_version = '1.9.20'

    enter image description here

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search