skip to Main Content

I am very much asking for help. I have been struggling with this problem for several months. I am trying to perform various methods that I found on the Internet and nothing helps. I always get this error:

Multiple build operations failed.
    Could not create task ':flutter_plugin_android_lifecycle:generateDebugUnitTestConfig'.
    Could not create task ':google_mobile_ads:generateDebugUnitTestConfig'.
    Could not create task ':path_provider_android:generateDebugUnitTestConfig'.
    Could not create task ':shared_preferences_android:generateDebugUnitTestConfig'.
    Could not create task ':url_launcher_android:generateDebugUnitTestConfig'.
    Could not create task ':webview_flutter_android:generateDebugUnitTestConfig'.
Could not create task ':flutter_plugin_android_lifecycle:generateDebugUnitTestConfig'.
this and base files have different roots: D:Androidaplikacjeaplikacja pod domenaapp-j-plappSource File V_3.0.5flywebbuildflutter_plugin_android_lifecycle and C:UsersatomAppDataLocalPubCachehostedpub.devflutter_plugin_android_lifecycle-2.0.17android.

The application was bought on CodeCanYon, but the author does not help.

When I run the flutter version application it turns on the emulator and the application displays fine.

When I open the Android folder in Android Studio the above error appears.

Here’s what I tried to do:

  1. deleted the content C:UsersatomAppDataLocalPubCache
  2. Tools -> Flutter -> Flutter Clean | Terminal -> flutter pub cache repair and Tools -> Flutter -> Flutter Pub Get
  3. .gradlew clean Error: BUILD FAILED in 3s 1 actionable task: 1 executed

2

Answers


  1. Chosen as BEST ANSWER

    In my case, it looks like this: I don't know which line to delete from here. I will ask for your advice.

    name: flyweb
    description: A new Flutter project.
    
    publish_to: 'none' # Remove this line if you wish to publish to pub.dev
    
    
    version: 1.0.0+1
    
    environment:
      sdk: '>=3.1.1 <4.0.0'
    
    dependencies:
      flutter:
        sdk: flutter
    
      #BASE
      nb_utils: ^5.0.8
      google_fonts: ^5.0.0
    
      #UI
      cached_network_image: ^3.3.0
      flutter_spinkit: ^5.2.0
      package_info_plus: ^4.0.2
      flutter_speed_dial: ^7.0.0
      stylish_bottom_bar: ^1.0.3
      page_transition: ^2.0.9
    
      #STORAGE & PERMISSION
      permission_handler: ^10.3.0
      path_provider: ^2.0.15
      provider: ^6.0.5
      shared_preferences: ^2.1.0
    
      #CONNECTIVITY
      http: ^1.0.0
      share_plus: ^7.0.2
      url_launcher: ^6.1.11
      store_redirect: ^2.0.1
      connectivity_plus: ^3.0.6
    
      #Firebase
      firebase_in_app_messaging: ^0.7.4+2
      firebase_messaging: ^14.6.0
      firebase_core: ^2.12.0
    
      #PUSH NOTIFICATION
      onesignal_flutter: ^5.0.1
    
      #ADS
      google_mobile_ads: ^3.0.0
      #facebook_audience_network: ^1.0.1
    
      #WEB TOOLS
      flutter_inappwebview: ^5.7.2+3
    
      # TOOLS
      android_path_provider: ^0.3.0
      restart_app: ^1.2.1
      launch_review: ^3.0.1
      device_info_plus: ^9.0.3
      flutter_barcode_scanner: ^2.0.0
      global_configuration: ^2.0.0-nullsafety.1
      mobile_scanner: ^3.4.1
      app_links: ^3.4.5
    
      # MAP
      location: ^5.0.3 #^4.4.0
      geolocator: ^9.0.2 #^10.1.0
    
      flutter_localizations:
        sdk: flutter
    
    dependency_overrides:
      flutter_cache_manager: ^3.3.0
      http: ^1.0.0
    
    
    dev_dependencies:
      flutter_test:
        sdk: flutter
    
    
      flutter_lints: ^2.0.0
    
    flutter:
    
      uses-material-design: true
    
    
      assets:
        - assets/img/
        - assets/img/flag/
        - assets/cfg/
    

  2. There seems to be an issue with the Android Lifecycle Package.

    check your pubspec.yaml file for this package:

    flutter_plugin_android_lifecycle:
    

    Remove the line and Run (1 after another)

    flutter pub get
    flutter pub add flutter_plugin_android_lifecycle
    flutter pub get
    

    This should reinstall the package.
    Don’t know if itll solve the problem though.

    If it doesnt help try searching your entire for the entire root path thats apparently different. If you find anything check if its set up correct or post the details here.

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