2023.3693 Android Error code: 256

Hello,

Can anybody help with this issue?

/private/var/folders/nb/q2vfxk_11dd30v5zdh4_l0cc0000gn/T/CLtmpupgGoC/template/app/build.gradle.kts: Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don’t have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses] /private/var/folders/nb/q2vfxk_11dd30v5zdh4_l0cc0000gn/T/CLtmpupgGoC/template/app/build.gradle.kts: Error: httpclient defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don’t have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

Explanation for issues of type “DuplicatePlatformClasses”: There are a number of libraries that duplicate not just functionality of the Android platform but using the exact same class names as the ones provided in Android – for example the apache http classes. This can lead to unexpected crashes.

To solve this, you need to either find a newer version of the library which no longer has this problem, or to repackage the library (and all of its dependencies) using something like the jarjar tool, or finally, rewriting the code to use different APIs (for example, for http code, consider using HttpUrlConnection or a library like okhttp).

2 errors, 0 warnings

FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ‘:App:lintVitalRelease’. > Lint found fatal errors while assembling a release target. Fix the issues identified by lint, or create a baseline to see only new errors: android { lint { baseline = file("lint-baseline.xml") } } For more details, see Improve your code with lint checks  |  Android Studio  |  Android Developers

/private/var/folders/nb/q2vfxk_11dd30v5zdh4_l0cc0000gn/T/CLtmpupgGoC/template/app/build.gradle.kts: Error: commons-logging defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don’t have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses] /private/var/folders/nb/q2vfxk_11dd30v5zdh4_l0cc0000gn/T/CLtmpupgGoC/template/app/build.gradle.kts: Error: httpclient defines classes that conflict with classes now provided by Android. Solutions include finding newer versions or alternative libraries that don’t have the same problem (for example, for httpclient use HttpUrlConnection or okhttp instead), or repackaging the library using something like jarjar. [DuplicatePlatformClasses]

Explanation for issues of type “DuplicatePlatformClasses”: There are a number of libraries that duplicate not just functionality of the Android platform but using the exact same class names as the ones provided in Android – for example the apache http classes. This can lead to unexpected crashes.

To solve this, you need to either find a newer version of the library which no longer has this problem, or to repackage the library (and all of its dependencies) using something like the jarjar tool, or finally, rewriting the code to use different APIs (for example, for http code, consider using HttpUrlConnection or a library like okhttp).

2 errors, 0 warnings * Try: > Run with --stacktrace option to get the stack trace. > Run with --info or --debug option to get more log output. > Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 39s
Aug 21 16:02:26.440 Android build failed (256) after 43 seconds
Aug 21 16:02:26.847 ERROR: Build Failed: Error code: 256

It was gpgs.v2 plugin.
Should move to v3.

Build completed and game running just fine on device.

2 Likes