With Solar2d version 3693 I’m encountering “Error code: 256” when building any apps that use Google Play Game Services. I hadn’t encountered this in 3691. My other apps built fine.
In my build.settings these are the lines used by GPGS:
settings = {
android =
{
googlePlayGamesAppId = "<MY_ID>",
},
}
plugins =
{
["plugin.gpgs.v2"] =
{
publisherId="com.coronalabs",
supportedPlatforms={android=true}
},
}
The error string looks like this:
private/var/folders/80/73y5tf3x0019_mb2qykw72980000gn/T/CLtmpZQMBhT/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/80/73y5tf3x0019_mb2qykw72980000gn/T/CLtmpZQMBhT/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 https://developer.android.com/studio/write/lint#snapshot
/private/var/folders/80/73y5tf3x0019_mb2qykw72980000gn/T/CLtmpZQMBhT/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/80/73y5tf3x0019_mb2qykw72980000gn/T/CLtmpZQMBhT/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 50s
Android build failed (256) after 54 seconds
ERROR: Build Failed: Error code: 256