androidflutterdartgradle

Namespace issue in flutter after update to Gradle to 8.0.0


I recently update Gradle "com.android.tools.build:gradle" version to 8.0.0 in my flutter project after that namespace issue started, So i change my build.gradle accordingly but it has not affect always throw error namespace not specified when build android project.

-- sorry for bad english--

I tried to add namespace in build.gradle(app) and remove package from AndroidManifest file as suggested and also after updating android studio not able to open AGP upgrade assistant in android so i am not able to resolve namespace error.

Please help if any one know, Thank you in advance.


Solution

  • Same issue i faced. Here is how i solved this issue.

    1. you need to update Kotlin versions.

    Ex : My updated version numbers below.

        classpath 'com.android.tools.build:gradle:7.4.2'
        classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
    
    1. update gradle wrapper

       distributionUrl=https://services.gradle.org/distributions/gradle-7.5-all.zip
      
    2. change ext kotlin version

       ext.kotlin_version = '1.9.0'
      

    Change these 3 and gradle sync it will fix this issue