The SDK crash with android.r8.optimizedResourceShrinking=true (new default for AGP 9.0.0)
17:12:35.268 E FATAL EXCEPTION: DefaultDispatcher-worker-3 (Fix with AI)
Process: com.example, PID: 17723
android.content.res.Resources$NotFoundException: Resource ID #0x0
at android.content.res.ResourcesImpl.getValue(ResourcesImpl.java:304)
at android.content.res.ResourcesImpl.openRawResource(ResourcesImpl.java:432)
at android.content.res.Resources.openRawResource(Resources.java:1415)
at android.content.res.Resources.openRawResource(Resources.java:1359)
at ch.datatrans.payment.r.<init>(SourceFile:17)
at ch.datatrans.payment.S3.invokeSuspend(SourceFile:7)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(SourceFile:34)
at kotlinx.coroutines.DispatchedTask.run(SourceFile:100)
at kotlinx.coroutines.internal.LimitedDispatcher$Worker.run(SourceFile:124)
at kotlinx.coroutines.scheduling.TaskImpl.run(SourceFile:89)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(SourceFile:586)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(SourceFile:820)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(SourceFile:717)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(SourceFile:704)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@705ce3, Dispatchers.IO]
https://android-developers.googleblog.com/2025/09/improve-app-performance-with-optimized-resource-shrinking.html
Starting with AGP 9.0.0, optimized resource shrinking becomes the standard behavior for any project that has the resource shrinker turned on.
The SDK crash with
android.r8.optimizedResourceShrinking=true(new default for AGP 9.0.0)https://android-developers.googleblog.com/2025/09/improve-app-performance-with-optimized-resource-shrinking.html