Flutter Build failed: "class file for android.arch.lifecycle.LifecycleOwner not found"

Description of the issue

The deployment of the app fails on the Flutter Build step (tested on 0.12.0, 0.11.0 and 0.9.0). It was working fine 2 days ago. Already tested older versions of the app (that has been successfully builded few days ago) and the error persists.

The flutter build using the same command as the Flutter Build step works fine locally.

Environment:

Stack

Visual Studio for Mac, Stable channel.

Step

Flutter Build v0.12.0 (and others).

Build log

Running Gradle task 'assembleRelease'...                        
Note: /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/appsflyer_sdk-1.2.0/android/src/main/java/com/appsflyer/appsflyersdk/AppsflyerSdkPlugin.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
/Users/vagrant/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.5/android/src/main/java/io/flutter/plugins/connectivity/ConnectivityPlugin.java:31: error: cannot access LifecycleOwner
    setupChannels(binding.getFlutterEngine().getDartExecutor(), binding.getApplicationContext());
                         ^
  class file for android.arch.lifecycle.LifecycleOwner not found
Note: /Users/vagrant/.pub-cache/hosted/pub.dartlang.org/connectivity-0.4.5/android/src/main/java/io/flutter/plugins/connectivity/ConnectivityBroadcastReceiver.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':connectivity: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 1m 45s
Running Gradle task 'assembleRelease'...                          107.1s
Gradle task assembleRelease failed with exit code 1
Failed to build Android platform, error: exit status 1

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.