'java.lang.NullPointerException (no error message) whenever I sync my project it always fails. This project is created with flutter

I have download a project from my old pc and tried to run it . but it keep on showing this error "java.lang.NullPointerException (no error message)" .It's working fine in my old pc.

Execution failed for task ':app:compileFlutterBuildDebug'.

java.lang.NullPointerException (no error message)

  • Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 7s Running Gradle task 'assembleDebug'... 8.8s Exception: Gradle task assembleDebug failed with exit code 1

And i tried these solution's :

I've deleted .gradle folder from the project. And Change gradle version. Uninstalled android studio and tried to match the version my old pc had. I've deleted pubspec.lock from the project.

Nothing worked for me but in my old pc its still running without any error but it does not work in other lap or pc.



Solution 1:[1]

have you put this in your gradle file

 android {
        lintOptions {
            checkReleaseBuilds false
        }
    }

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 benten