Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during compilation Flutter 2.2.2 #750

Closed
1 task done
dariocavada opened this issue Jun 18, 2021 · 1 comment
Closed
1 task done

Error during compilation Flutter 2.2.2 #750

dariocavada opened this issue Jun 18, 2021 · 1 comment
Labels
new issue An issue that hasn't yet been seen from the maintainer

Comments

@dariocavada
Copy link

Do flutter clean and build, but still have this error

Describe the bug
It shows a list of errors during a compilation, see snippet below.

Platform

  • Android
  • [] iOS
  • [] Web
  • [] Desktop (Go)

Platform OS version
What version did it happen?
macOS 11.4
flutter 2.2.2

How are you picking?

FAILURE: Build failed with an exception.                                
                                                                        
* What went wrong:                                                      
Execution failed for task ':app:processDebugResources'.                 
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource linking failed                                    
     /Users/dariocavada/WorkingDirectory/github/mdg-caritro/app/aboxviewer/build/file_picker/intermediates/library_manifest/debug/AndroidManifest.xml:9:5-15:15: AAPT: error: unexpected element <queries> found in <manifest>.
                                                                        
                                                                        
* 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 23s                                                     
Running Gradle task 'assembleDebug'...                                  
Running Gradle task 'assembleDebug'... Done                        25,2s
The build failed likely due to AndroidX incompatibilities in a plugin. The tool is about to try using Jetifier to solve the incompatibility.
Building plugin file_picker...
Running Gradle task 'assembleAarRelease'...                             
Running Gradle task 'assembleAarRelease'... Done                 1.892ms

/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:10: error: cannot find symbol
import androidx.lifecycle.DefaultLifecycleObserver;
                         ^
  symbol:   class DefaultLifecycleObserver
  location: package androidx.lifecycle
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:20: error: cannot find symbol
import io.flutter.embedding.engine.plugins.lifecycle.FlutterLifecycleAdapter;
                                                    ^
  symbol:   class FlutterLifecycleAdapter
  location: package io.flutter.embedding.engine.plugins.lifecycle
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:38: error: cannot find symbol
            implements Application.ActivityLifecycleCallbacks, DefaultLifecycleObserver {
                                                               ^
  symbol:   class DefaultLifecycleObserver
  location: class FilePickerPlugin
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:45: error: method does not override or implement a method from a supertype
        @Override
        ^
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:49: error: method does not override or implement a method from a supertype
        @Override
        ^
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:53: error: method does not override or implement a method from a supertype
        @Override
        ^
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:57: error: method does not override or implement a method from a supertype
        @Override
        ^
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:61: error: method does not override or implement a method from a supertype
        @Override
        ^
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:66: error: method does not override or implement a method from a supertype
        @Override
        ^
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:277: error: cannot find symbol
            this.lifecycle = FlutterLifecycleAdapter.getActivityLifecycle(activityBinding);
                             ^
  symbol:   variable FlutterLifecycleAdapter
  location: class FilePickerPlugin
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:278: error: incompatible types: FilePickerPlugin.LifeCycleObserver cannot be converted to LifecycleObserver
            this.lifecycle.addObserver(this.observer);
                                           ^
/Users/dariocavada/.pub-cache/hosted/pub.dartlang.org/file_picker-3.0.2+2/android/src/main/java/com/mr/flutter/plugin/filepicker/FilePickerPlugin.java:287: error: incompatible types: FilePickerPlugin.LifeCycleObserver cannot be converted to LifecycleObserver
            this.lifecycle.removeObserver(this.observer);
                                              ^
Note: Some messages have been simplified; recompile with -Xdiags:verbose to get full output
12 errors

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.

* 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 1s

Details to reproduce the issue
Provide all the details to reproduce the issue.

Error Log
Please, post the full console log of your issue, if applicable.

Screenshots and/or video
If applicable, add screenshots or video to help explain your problem.

Flutter Version details
Please, post the output of your flutter doctor -v, preferably, while running the issued device/simulator.

Additional context
Add any other context about the problem here.

@dariocavada dariocavada added the new issue An issue that hasn't yet been seen from the maintainer label Jun 18, 2021
@miguelpruivo
Copy link
Owner

This likely has a solution detailed here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new issue An issue that hasn't yet been seen from the maintainer
Projects
None yet
Development

No branches or pull requests

2 participants