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

Execution failed for task ':app:compressReleaseResourcesWithPngquant'. #403

Open
Heart-Beats opened this issue Jan 19, 2023 · 3 comments
Open

Comments

@Heart-Beats
Copy link

Please provide the following informations.

  • System version
    windows 11

  • Java version
    Java 11

  • Gradle version
    7.3.3

  • Android Gradle plugin version
    7.2.1

  • Booster version
    4.15.0

  • Stack traces

Command `E:\AndroidProject\youma\youkeyun\app\build\bin\pngquant.exe --strip --skip-if-larger -f -o E:\AndroidProject\youma\youkeyun\app\build\intermediates\compressed_res_pngquant\release\compressReleaseResourcesWithPngquant\drawable-xxxhdpi-v4\exo_ic_speed.png -s 3 -Q 80-100 D:\.gradle\caches\transforms-3\7f11d2b23a51478e42ee044a85fdfb01\transformed\jetified-exoplayer-ui-2.17.1\res\drawable-xxxhdpi-v4\exo_ic_speed.png` exited with non-zero value 98
Command `D:\AndroidSDK\build-tools\30.0.3\aapt2.exe compile -o E:\AndroidProject\youma\youkeyun\app\build\intermediates\merged_res\release E:\AndroidProject\youma\youkeyun\app\build\intermediates\compressed_res_pngquant\release\compressReleaseResourcesWithPngquant\drawable-hdpi-v4\ysf_ic_gif.png` exited with non-zero value 0
Command `E:\AndroidProject\youma\youkeyun\app\build\bin\pngquant.exe --strip --skip-if-larger -f -o E:\AndroidProject\youma\youkeyun\app\build\intermediates\compressed_res_pngquant\release\compressReleaseResourcesWithPngquant\drawable-hdpi-v4\ysf_audio_animation_list_right_1.png -s 3 -Q 80-100 D:\.gradle\caches\transforms-3\f8002311c7b29eb056c464aaf92c72a0\transformed\jetified-ysfkit-9.4.0\res\drawable-hdpi-v4\ysf_audio_animation_list_right_1.png` exited with non-zero value 98
Command `E:\AndroidProject\youma\youkeyun\app\build\bin\pngquant.exe --strip --skip-if-larger -f -o E:\AndroidProject\youma\youkeyun\app\build\intermediates\compressed_res_pngquant\release\compressReleaseResourcesWithPngquant\drawable-hdpi-v4\nim_explosion_four.png -s 3 -Q 80-100 D:\.gradle\caches\transforms-3\6d48cbd7ce0915cbf85b1b83fd3f84e5\transformed\jetified-nim-uikit-0.4.3\res\drawable-hdpi-v4\nim_explosion_four.png` exited with non-zero value 98
Command `E:\AndroidProject\youma\youkeyun\app\build\bin\pngquant.exe --strip --skip-if-larger -f -o E:\AndroidProject\youma\youkeyun\app\build\intermediates\compressed_res_pngquant\release\compressReleaseResourcesWithPngquant\drawable-xxxhdpi-v4\ic_arrow_drop_down_white_24dp.png -s 3 -Q 80-100 D:\.gradle\caches\transforms-3\1f26067c630e2a87708892048c77114b\transformed\jetified-matisse-0.5.2-beta2\res\drawable-xxxhdpi-v4\ic_arrow_drop_down_white_24dp.png` exited with non-zero value 98
Command `E:\AndroidProject\youma\youkeyun\app\build\bin\pngquant.exe --strip --skip-if-larger -f -o E:\AndroidProject\youma\youkeyun\app\build\intermediates\compressed_res_pngquant\release\compressReleaseResourcesWithPngquant\drawable-xxxhdpi-v4\exo_ic_forward.png -s 3 -Q 80-100 D:\.gradle\caches\transforms-3\7f11d2b23a51478e42ee044a85fdfb01\transformed\jetified-exoplayer-ui-2.17.1\res\drawable-xxxhdpi-v4\exo_ic_forward.png` exited with non-zero value 98
Command `E:\AndroidProject\youma\youkeyun\app\build\bin\pngquant.exe --strip --skip-if-larger -f -o E:\AndroidProject\youma\youkeyun\app\build\intermediates\compressed_res_pngquant\release\compressReleaseResourcesWithPngquant\drawable-xxxhdpi-v4\exo_ic_subtitle_off.png -s 3 -Q 80-100 D:\.gradle\caches\transforms-3\7f11d2b23a51478e42ee044a85fdfb01\transformed\jetified-exoplayer-ui-2.17.1\res\drawable-xxxhdpi-v4\exo_ic_subtitle_off.png` exited with non-zero value 98

Execution failed for task ':app:compressReleaseResourcesWithPngquant'.
> Process 'command 'D:\AndroidSDK\build-tools\30.0.3\aapt2.exe'' finished with non-zero exit value 1

另外,去除 Pngquant 插件后在打包时报以下警告,但不会编译失败:

> Task :app:removeReleaseRedundantResources
Execution optimizations have been disabled for task ':app:removeReleaseRedundantResources' to ensure correctness due to the following reasons:
  - Additional action of task ':app:removeReleaseRedundantResources' was implemented by the Java lambda 'com.didiglobal.booster.task.resource.deredundancy.ResourceDeredundancyVariantProcessor$$Lambda$2327/0x0000000802696c40'. Reason: Using Java lambdas is not supported as task inputs. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implementation_unknown for more details about this problem.

> Task :app:compressReleaseResourcesWithCwebp
Execution optimizations have been disabled for task ':app:compressReleaseResourcesWithCwebp' to ensure correctness due to the following reasons:
  - Additional action of task ':app:compressReleaseResourcesWithCwebp' was implemented by the Java lambda 'com.didiglobal.booster.task.compression.cwebp.CwebpCompressionVariantProcessor$$Lambda$2322/0x0000000802697840'. Reason: Using Java lambdas is not supported as task inputs. Please refer to https://docs.gradle.org/7.3.3/userguide/validation_problems.html#implementation_unknown for more details about this problem.
@08carmelo
Copy link

你好,我执行./gradlew compressDebugResourcesWithCwebp --info 遇到类似的报错,后来你解决了吗?

@Heart-Beats
Copy link
Author

你好,我执行./gradlew compressDebugResourcesWithCwebp --info 遇到类似的报错,后来你解决了吗?

        // 滴滴性能优化插件
        classpath "com.didiglobal.booster:booster-gradle-plugin:$booster_version"

        if (!debug) {
            // *************  包体积优化相关插件   ************
            // 采用 cwebp 对资源进行压缩
            classpath "com.didiglobal.booster:booster-task-compression-cwebp:$booster_version"
            // 采用 pngquant 对资源进行压缩
            //            classpath "com.didiglobal.booster:booster-task-compression-pngquant:$booster_version"
            //            classpath "io.johnsonlee.booster:booster-pngquant-provider:2.4.0"
            // ap_ 文件压缩
            classpath "com.didiglobal.booster:booster-task-compression-processed-res:$booster_version"
            // 去冗余资源
            classpath "com.didiglobal.booster:booster-task-resource-deredundancy:$booster_version"
            // 资源索引内联
            classpath "com.didiglobal.booster:booster-transform-r-inline:$booster_version"
            // DataBinding BR索引内联
            classpath "com.didiglobal.booster:booster-transform-br-inline:$booster_version"

            // 显示 AAR 包含的动态库清单
            classpath "com.didiglobal.booster:booster-task-list-shared-library:$booster_version"
        }

你试试这样的配置,我后面应该是 pngquant 这个插件给去除引入了

@08carmelo
Copy link

你执行后 项目的webp被压缩了吗?
我这里还是不行。 编译可以通过,但是有警告,webp都没有被压缩。

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