-
Notifications
You must be signed in to change notification settings - Fork 27.1k
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
WorkValidationException on add-to-app project for task ':flutter:copyFlutterAssetsRelease' on Gradle 8.1 and AGP 8.0 #129471
Comments
Thanks for the report. |
This seems to be a workaround that requires amending the files generated by the Flutter SDK (same files that shouldn't be added to version control), is this correct? These lines were added to
This solves the exception previously shown above. Is there a way for this to be included by default when generating files on Flutter SDK? I see the referred comment was posted several months ago, is there a blocking issue or major refactor awaiting? Personally, I'd like to depend on as less workarounds as possible, to be able that the team members can configure the project more easily. Also, to be able to use AGP 8.0 we require Gradle 8, so, for this case, downgrading Gradle versions to the one where this is a warning instead of an exception, isn't a choice either, unfortunately. |
Thanks for the update. Keeping this issue open based on the error received and above feedback. |
To whoever takes this bug: this is probably a problem we have with other tasks. When fixing this bug, identify anything in the code that can allow us to audit the rest of our code for similar problems. |
To add some more info: the problem lies in the wrongly-setup dependencies between Flutter Gradle Plugin's own Gradle tasks. The issue and comments @darshankawar linked to above are good starting points for someone to start working on it. The final result will be probably similar to #121958 (this is the PR that fixes a similar error for full-Flutter apps). |
I have the same problem, so thank you so much for that workaround. It helped me with the DEBUG build. However, there is a problem with the RELEASE build. here Unfortunately, I have no idea how to fix this. Possibly you faced the same problem?
|
@sunchangtan thank you so much! it helped. |
Where exactly does this go? I tried adding this to my build.gradle as a workaround but I get this error `A problem occurred configuring root project 'Timing'.
|
@jnstahl Use the workaround from sunchangtan. It helps. |
@sunchangtan @jnstahl
Now, I don't need to change Flutter sources. I hope this will be helpful. |
project build.gradle add this:
|
#137370 should land shortly, and fixed this issue in my local reproduction. There are multiple workflows to run add to app projects though, so please let me know if it doesn't fix it for you |
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 |
Is there an existing issue for this?
Steps to reproduce
Start compiling app (task :app:assembleRelease)
Expected results
Build succeeds and app is installed on device.
Actual results
Build fails on task :flutter:copyFlutterAssetsRelease, after finishing all other native tasks for the project.
Screenshot below shows the tasks with warnings or failures for the current build.
Code sample
This issue is not related with Dart code.
Screenshots or Video
Screenshots / Video demonstration
Logs
Logs
Flutter Doctor output
Doctor output
The text was updated successfully, but these errors were encountered: