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

Build Failure When Running appSizeAnalysisRelease - Output folders are not match #9

Open
joelkanyi opened this issue Dec 9, 2024 · 1 comment

Comments

@joelkanyi
Copy link

I was trying to integrate the library into our codebase, but I'm encountering an issue.

Here is the block that I added to the app-level Gradle file:
Screenshot of the Gradle block

When I run the following command:

./gradlew app:appSizeAnalysisRelease --no-configure-on-demand --no-configuration-cache --stacktrace

I receive the following output in the terminal:

> Task :app:generateApkRelease FAILED
The app.apks generated successfully

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:generateApkRelease'.
> Output folders are not match for default_device15161887257484072452

@MinhNguyen-nvm
Copy link
Contributor

The way that you set the device specs needed to be corrected. It's unnecessary to create a new ListProperty
Try this:

appSizer {
    enabled = true
    projectInput {
        apk {
            // Remove val deviceSpecs = project.objects.listProperty(...)

            deviceSpecs = [
                    file("${rootProject.rootDir}/app-size-config/device-1.json"),
                    file("${rootProject.rootDir}/app-size-config/device-2.json")
            ]
        }
       ....
    }

Or using Gradle Kotlin DSL

        apk {
            deviceSpecs.set(listOf(
                file("${rootProject.rootDir}/app-size-config/device-1.json"),
                file("${rootProject.rootDir}/app-size-config/device-2.json")
            ))
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants