I am able gradle build from Android Studio and cmd. But this issue is only coming in Jenkins while building. This issue didn't come in Mac Jenkins setup, but is coming in my Windows setup.
Below is my gradle setting.
:app:mergeBetaDebugResources
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\671e94b2d47b0ef7a24e43f8814a29b911cc4872\output\res\drawable-ldrtl-mdpi\abc_ic_ab_back_mtrl_am_alpha.png ERROR: Unable to open PNG file
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\7dc509eb0db17265925a5800b67445547ef97697\output\res\drawable-hdpi\common_google_signin_btn_text_dark_disabled.9.png ERROR: Unable to open PNG file
AAPT: \\?\C:\Windows\System32\config\systemprofile\.android\build-cache\671e94b2d47b0ef7a24e43f8814a29b911cc4872\output\res\drawable-ldrtl-xxxhdpi\abc_ic_menu_copy_mtrl_am_alpha.png ERROR: Unable to open PNG file
Error: Some file crunching failed, see logs for details
:app:mergeBetaDebugResources FAILED
This error is because of the new feature of build-cache. It is using the default build-cache folder which is a long path. You can disable build-cache by adding android.enableBuildCache=false to you gradle.properties or set the build-cache path. See https://developer.android.com/studio/build/build-cache.html
:app:generateReleaseResources
those who encountered the error must add following line to gradle.properties
after gradle3.x
android.enableBuildCache=false
android.enableAapt2=true
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With