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

The release package failed on Android #5038

Closed
Junzz0 opened this issue Jun 28, 2024 · 7 comments
Closed

The release package failed on Android #5038

Junzz0 opened this issue Jun 28, 2024 · 7 comments
Assignees
Labels
bug Something isn't working submitted

Comments

@Junzz0
Copy link

Junzz0 commented Jun 28, 2024

Describe the bug
Using 1.7.0-dev1698 to release the release package on Android failed,
With 1.6.11, you can successfully release the Android release package.

buildTypes == debug
The packaging will succeed

buildTypes == release

  • What went wrong:
    A problem was found with the configuration of task ':composeApp:generateReleaseLintVitalReportModel' (type 'LintModelWriterTask').
    • Gradle detected a problem with the following location: '/composeApp/build/generated/assets/releaseAssetsCopyForAGP'.

      Reason: Task ':composeApp:generateReleaseLintVitalReportModel' uses this output of task ':composeApp:releaseAssetsCopyForAGP' without declaring an explicit or implicit dependency. This can lead to incorrect results being produced, depending on what order the tasks are executed.

      Possible solutions:

      1. Declare task ':composeApp:releaseAssetsCopyForAGP' as an input of ':composeApp:generateReleaseLintVitalReportModel'.
      2. Declare an explicit dependency on ':composeApp:releaseAssetsCopyForAGP' from ':composeApp:generateReleaseLintVitalReportModel' using Task#dependsOn.
      3. Declare an explicit dependency on ':composeApp:releaseAssetsCopyForAGP' from ':composeApp:generateReleaseLintVitalReportModel' using Task#mustRunAfter.

Affected platforms

  • Android

Versions

  • Libraries:
    • Compose Multiplatform version: "1.7.0-dev1698"
  • Kotlin version: 2.0.0
  • JDK (for desktop issues): 17

To Reproduce
Publish an Android release package.

Expected behavior
A release package for Android has been successfully released

Screenshots
1
2

Additional context
If you use dependencyGuard, it will report a missing releaseRuntimeClasspath

dependencyGuard {
configuration("debugAndroidTestCompileClasspath")
configuration("debugAndroidTestRuntimeClasspath")
configuration("debugCompileClasspath")
configuration("debugRuntimeClasspath")
configuration("debugUnitTestCompileClasspath")
configuration("debugUnitTestRuntimeClasspath")
configuration("desktopCompileClasspath")
configuration("desktopRuntimeClasspath")
configuration("desktopTestCompileClasspath")
configuration("desktopTestRuntimeClasspath")
configuration("metadataCompileClasspath")
}

@Junzz0 Junzz0 added bug Something isn't working submitted labels Jun 28, 2024
@Junzz0
Copy link
Author

Junzz0 commented Jun 28, 2024

#4085

This bug seems to be encountered as well, but I'm not sure if it's the same issue.

Because I removed all the implementation(compose.components.resources) dependencies from the project, the packaging still failed.

@terrakok terrakok self-assigned this Jun 28, 2024
@terrakok
Copy link
Member

Fixed here: 22dfb14

@Junzz0
Copy link
Author

Junzz0 commented Jul 4, 2024

If you update to 1.7.0-alpha01,

buildTypes == release

isMinifyEnabled = false
isShrinkResources = false -> The build was successful.

isMinifyEnabled = true
isShrinkResources = true -> The build failed.

Error messages can be found here: #5058

@terrakok

@hmy65
Copy link

hmy65 commented Jul 4, 2024

@terrakok @Junzz0
Update to agp 8.3.0 fixed this issue.

@terrakok
Copy link
Member

terrakok commented Jul 8, 2024

@Junzz0 I don't understand why you added the comment here. Did your build fail with the same log?

@terrakok
Copy link
Member

terrakok commented Jul 8, 2024

Anyway, this was fixed in #5076 as well

@okushnikov
Copy link
Collaborator

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.

@JetBrains JetBrains locked and limited conversation to collaborators Dec 18, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working submitted
Projects
None yet
Development

No branches or pull requests

4 participants