Itâs now doesnât build. Here is log
14:52:10.420 WARNING: [Processor] Library 'C:\Users\solar\.gradle\caches\modules-2\files-2.1\com.my.target\mytarget-sdk\5.20.0\d8e84cd0958cb79fad45c6b5d1a3ab53aa3579f8\mytarget-sdk-5.20.0.aar' contains references to both AndroidX and old support library. This seems like the library is partially migrated. Jetifier will try to rewrite the library anyway.
14:52:10.420 Example of androidX reference: 'androidx/annotation/Nullable'
14:52:10.420 Example of support library reference: 'android/support/annotation/VisibleForTesting'
14:52:10.420 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa35804\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]
14:52:10.420 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa35804\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]
14:52:10.420
14:52:10.420 Explanation for issues of type "DuplicatePlatformClasses":
14:52:10.420 There are a number of libraries that duplicate not just functionality of
14:52:10.420 the Android platform but using the exact same class names as the ones
14:52:10.420 provided in Android -- for example the apache http classes. This can lead
14:52:10.420 to unexpected crashes.
14:52:10.420
14:52:10.420 To solve this, you need to either find a newer version of the library which
14:52:10.420 no longer has this problem, or to repackage the library (and all of its
14:52:10.420 dependencies) using something like the jarjar tool, or finally, rewriting
14:52:10.420 the code to use different APIs (for example, for http code, consider using
14:52:10.420 HttpUrlConnection or a library like okhttp).
14:52:10.420
14:52:10.420 2 errors, 0 warnings
14:52:10.420
14:52:10.420
14:52:10.420 FAILURE: Build failed with an exception.
14:52:10.420
14:52:10.420 * What went wrong:
14:52:10.420 Execution failed for task ':App:lintVitalRelease'.
14:52:10.420 > Lint found fatal errors while assembling a release target.
14:52:10.420
14:52:10.420 Fix the issues identified by lint, or create a baseline to see only new errors:
14:52:10.420 ```
14:52:10.420 android {
14:52:10.420 lint {
14:52:10.420 baseline = file("lint-baseline.xml")
14:52:10.420 }
14:52:10.420 }
14:52:10.420 ```
14:52:10.420
14:52:10.420 For more details, see https://developer.android.com/studio/write/lint#snapshot
14:52:10.420
14:52:10.420 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa35804\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]
14:52:10.420 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa35804\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]
14:52:10.420
14:52:10.420 Explanation for issues of type "DuplicatePlatformClasses":
14:52:10.420 There are a number of libraries that duplicate not just functionality of
14:52:10.420 the Android platform but using the exact same class names as the ones
14:52:10.420 provided in Android -- for example the apache http classes. This can lead
14:52:10.420 to unexpected crashes.
14:52:10.420
14:52:10.420 To solve this, you need to either find a newer version of the library which
14:52:10.420 no longer has this problem, or to repackage the library (and all of its
14:52:10.420 dependencies) using something like the jarjar tool, or finally, rewriting
14:52:10.420 the code to use different APIs (for example, for http code, consider using
14:52:10.420 HttpUrlConnection or a library like okhttp).
14:52:10.420
14:52:10.420 2 errors, 0 warnings
14:52:10.420
14:52:10.420 * Try:
14:52:10.420 > Run with --stacktrace option to get the stack trace.
14:52:10.420 > Run with --info or --debug option to get more log output.
14:52:10.420 > Run with --scan to get full insights.
14:52:10.420
14:52:10.420 * Get more help at https://help.gradle.org
14:52:10.420
14:52:10.420 BUILD FAILED in 4m 15s
Building without MyTarget wonât help
14:55:28.580 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa11140\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]
14:55:28.580 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa11140\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]
14:55:28.580
14:55:28.580 Explanation for issues of type "DuplicatePlatformClasses":
14:55:28.580 There are a number of libraries that duplicate not just functionality of
14:55:28.580 the Android platform but using the exact same class names as the ones
14:55:28.580 provided in Android -- for example the apache http classes. This can lead
14:55:28.580 to unexpected crashes.
14:55:28.580
14:55:28.580 To solve this, you need to either find a newer version of the library which
14:55:28.580 no longer has this problem, or to repackage the library (and all of its
14:55:28.580 dependencies) using something like the jarjar tool, or finally, rewriting
14:55:28.580 the code to use different APIs (for example, for http code, consider using
14:55:28.580 HttpUrlConnection or a library like okhttp).
14:55:28.580
14:55:28.580 2 errors, 0 warnings
14:55:28.580
14:55:28.580
14:55:28.580 FAILURE: Build failed with an exception.
14:55:28.580
14:55:28.580 * What went wrong:
14:55:28.580 Execution failed for task ':App:lintVitalRelease'.
14:55:28.580 > Lint found fatal errors while assembling a release target.
14:55:28.580
14:55:28.580 Fix the issues identified by lint, or create a baseline to see only new errors:
14:55:28.580 ```
14:55:28.580 android {
14:55:28.580 lint {
14:55:28.580 baseline = file("lint-baseline.xml")
14:55:28.580 }
14:55:28.580 }
14:55:28.580 ```
14:55:28.580
14:55:28.580 For more details, see https://developer.android.com/studio/write/lint#snapshot
14:55:28.580
14:55:28.580 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa11140\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]
14:55:28.580 C:\Users\solar\AppData\Local\Temp\Corona Labs\CLtmpa11140\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]
14:55:28.580
14:55:28.580 Explanation for issues of type "DuplicatePlatformClasses":
14:55:28.580 There are a number of libraries that duplicate not just functionality of
14:55:28.580 the Android platform but using the exact same class names as the ones
14:55:28.580 provided in Android -- for example the apache http classes. This can lead
14:55:28.580 to unexpected crashes.
14:55:28.580
14:55:28.580 To solve this, you need to either find a newer version of the library which
14:55:28.580 no longer has this problem, or to repackage the library (and all of its
14:55:28.580 dependencies) using something like the jarjar tool, or finally, rewriting
14:55:28.580 the code to use different APIs (for example, for http code, consider using
14:55:28.580 HttpUrlConnection or a library like okhttp).
14:55:28.580
14:55:28.580 2 errors, 0 warnings
14:55:28.580
14:55:28.580 * Try:
14:55:28.580 > Run with --stacktrace option to get the stack trace.
14:55:28.580 > Run with --info or --debug option to get more log output.
14:55:28.580 > Run with --scan to get full insights.
14:55:28.580
14:55:28.580 * Get more help at https://help.gradle.org
14:55:28.580
14:55:28.580 BUILD FAILED in 1m 31s
14:55:30.725 Android build failed (1) after 96 seconds
I found thread where somebody wrote that migrating to GPGS v3 would help (we were using v2). We tried and build was successfull but app crashed on startup (on Appodeal init) with this error (I wasnât able to copy itâs all)
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V in class Lcom/appodeal/ads/modules/common/internal/service/ServiceInfo; or its super classes (declaration of 'com.appodeal.ads.modules.common.internal.service.ServiceInfo' appears in base.apk!classes2.dex)
at com.appodeal.ads.services.sentry_analytics.SentryAnalyticsService.<init>(SentryAnalyticsService.kt:4)
at java.lang.Class.newInstance(Native Method)
at com.appodeal.ads.services.a.getAvailableServicesInfo(SourceFile:3)
at com.appodeal.ads.i3.a(SourceFile:109)
at com.appodeal.ads.f2.a(Unknown Source:116)
at com.appodeal.ads.f2$a.invokeSuspend(Unknown Source:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@aaca8ab, Dispatchers.Main]
java.lang.NoSuchMethodError: No direct method <init>(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V in class Lcom/appodeal/ads/modules/common/internal/service/ServiceInfo; or its super classes (declaration of 'com.appodeal.ads.modules.common.internal.service.ServiceInfo' appears in base.apk!classes2.dex)
at com.appodeal.ads.services.sentry_analytics.SentryAnalyticsService.<init>(SentryAnalyticsService.kt:4)
at java.lang.Class.newInstance(Native Method)
at com.appodeal.ads.services.a.getAvailableServicesInfo(SourceFile:3)
at com.appodeal.ads.i3.a(SourceFile:109)
at com.appodeal.ads.f2.a(Unknown Source:116)
at com.appodeal.ads.f2$a.invokeSuspend(Unknown Source:12)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(LimitedDispatcher.kt:115)
at kotlinx.coroutines.scheduling.TaskImpl.run(Tasks.kt:100)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:584)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:793)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:697)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:684)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@aaca8ab, Dispatchers.Main]