Guardsquare/proguard

com.android.tools.r8.ResourceException: com.android.tools.r8.internal.vc: I/O exception while reading

Hari-Nikesh-R opened this issue · 1 comments

I recently upgraded the Android Gradle Plugin in my Android app project from version 7.4.2 to 8.2.2. However, I'm now encountering an error during the release build when the minifyReleaseWithR8 task is executed.

com.android.tools.r8.ResourceException: com.android.tools.r8.internal.vc: I/O exception while reading '/Users/harinikesh/StudioProjects/instore/app/build/intermediates/merged_java_res/kioskRelease/base.jar': /Users/harinikesh/StudioProjects/instore/app/build/intermediates/merged_java_res/kioskRelease/base.jar
I got this error while generating the release build with

release { shrinkResources true minifyEnabled true proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}

I tried making the shrinkResources and minifyEnabled to false, Build got successful.

Relevant log output
com.android.tools.r8.ResourceException: com.android.tools.r8.internal.vc: I/O exception while reading '/Users/harinikesh/StudioProjects/instore/app/build/intermediates/merged_java_res/kioskRelease/base.jar': /Users/harinikesh/StudioProjects/instore/app/build/intermediates/merged_java_res/kioskRelease/base.jar

For reference : https://stackoverflow.com/questions/78026765/error-when-minifying-android-app-with-r8-after-upgrading-android-gradle-plugin-t

Can anyone please help me on this?

Hi @Hari-Nikesh-R !

This appears to be an AGP or R8 issue, rather than a ProGuard issue.

Therefore you should open an issue on the Google issue tracker: https://issuetracker.google.com/issues?q=status:open%20componentid:192709&s=created_time:desc