skip to Main Content

flutter build fails
Could not create task ‘:flutter_plugin_android_lifecycle:generateDebugUnitTestConfig’.
this and base files have different roots: D:untitledbuildflutter_plugin_android_lifecycle and C:UsersRKAppDataLocalPubCachehostedpub.devflutter_plugin_android_lifecycle-2.0.15android.

Could not create task ‘:flutter_plugin_android_lifecycle:generateDebugUnitTestConfig’.
this and base files have different roots: D:untitledbuildflutter_plugin_android_lifecycle and C:UsersRKAppDataLocalPubCachehostedpub.devflutter_plugin_android_lifecycle-2.0.15android.

2

Answers


  1. Chosen as BEST ANSWER

    inside the android not the root directory I did: run flutter clean flutter upgrade flutter pub get flutter pub update


    1. You need to run: flutter clean
    2. Check and sync gradle files with project
    3. Sometimes helps to update the gradle version to 7.0.3 (from 7.0.0)
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search