You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[flutter_plugin_android_lifecycle] Fails to compile on versions of flutter prior to 3.27. #164362
1. What went wrong:
A problem occurred evaluating project ':flutter_plugin_android_lifecycle'.
> Could not get unknown property 'flutter' for extension 'android' of type com.android.build.gradle.LibraryExtension.
2. What went wrong:
A problem occurred configuring project ':flutter_plugin_android_lifecycle'.
Failed to notify project evaluation listener.
Cannot invoke method substring() on null object
compileSdkVersion is not specified. Please add it to build.gradle
Same error in version flutter_plugin_android_lifecycle 2.0.25.
I add flutter_plugin_android_lifecycle 2.0.24 to dependency_overrides before any update to fix error when run flutter "build" "appbundle"
@phuc-tranh-otsv is there anything else need to be changed apart from dependency overrides? looks like it is not working while build the android build on App centre
dependency_overrides had this error after setting and I finally fixed this error by upgrading the flutter version number to 3.27.0, I had to get used to the new version, headache
I did realize that the ability to reference flutter.compileSdkVersion was a 3.27 and higher feature. What I failed to realize was that the minimum flutter version was not already 3.27.
I will patch forward change that sets the compile sdk version to 35 then bump the min flutter version then reland the change to use flutter.compileSdkVersion.
changed the title [-]Not able to take android build[/-][+][flutter_plugin_android_lifecycle] Fails to compile on versions of flutter prior to 3.27. [/+]on Feb 28, 2025
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@71de0fd9 of type BuildFlowService.Parameters
> A problem occurred configuring project ':flutter_plugin_android_lifecycle'.
> Failed to notify project evaluation listener.
> Cannot invoke method substring() on null object
> com.android.builder.errors.EvalIssueException: compileSdkVersion is not specified. Please add it to build.gradle
* 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 10s
Error: Gradle task assembleDebug failed with exit code 1
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
Cedar-byte commentedon Feb 28, 2025
phuc-tranh-otsv commentedon Feb 28, 2025
Same error in version flutter_plugin_android_lifecycle 2.0.25.
I add flutter_plugin_android_lifecycle 2.0.24 to dependency_overrides before any update to fix error when run flutter "build" "appbundle"
phuc-tranh-otsv commentedon Feb 28, 2025
After investigate, I can see the root cause of your error.
The
public final int compileSdkVersion = 35in https://github.com/flutter/flutter/blob/master/packages/flutter_tools/gradle/src/main/groovy/flutter.groovy#L52C22-L52C39released for flutter from version 3.27.0.
If you use flutter_plugin_android_lifecycle 2.0.25 with flutter version < 3.27.0. You will get the error.
You can
abdul61093312 commentedon Feb 28, 2025
@phuc-tranh-otsv is there anything else need to be changed apart from dependency overrides? looks like it is not working while build the android build on App centre
Cedar-byte commentedon Feb 28, 2025
dependency_overrides had this error after setting and I finally fixed this error by upgrading the flutter version number to 3.27.0, I had to get used to the new version, headache
darshankawar commentedon Feb 28, 2025
@sabarinath-kv
Please upgrade to latest stable and re-run your scenario to check if this is fixed or not.
abdul61093312 commentedon Feb 28, 2025
Building with 3.27.1 is working for me
reidbaker commentedon Feb 28, 2025
I did realize that the ability to reference flutter.compileSdkVersion was a 3.27 and higher feature. What I failed to realize was that the minimum flutter version was not already 3.27.
I will patch forward change that sets the compile sdk version to 35 then bump the min flutter version then reland the change to use flutter.compileSdkVersion.
Sorry for the trouble.
[-]Not able to take android build[/-][+][flutter_plugin_android_lifecycle] Fails to compile on versions of flutter prior to 3.27. [/+]normidar commentedon Feb 28, 2025
My error message:
env:
[flutter_plugin_android_lifecycle] Removes flutter.compileSdkVersion …
[tool] Validate gradle compileSdk (#8761)
github-actions commentedon Mar 21, 2025
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.