sumup / sumup-android-api

Other
19 stars 10 forks source link

App cannot run after migrating to Android Studio 4.0 - Gradle 4 #22

Open vladaman opened 4 years ago

vladaman commented 4 years ago

After upgrading to Android Studio 4.0 with Gradle 4.0 the app no longer starts with SumUp SDK:

For some reason the res/raw/sumup.bks is not bundled.

06-05 14:22:14.051 16963 16963 E AndroidRuntime: java.lang.RuntimeException: Unable to create application MyApp: android.content.res.Resources$NotFoundException: File res/raw/sumup.bks from drawable resource ID #0x7f120006
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5593)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.app.ActivityThread.-wrap2(ActivityThread.java)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1629)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.os.Handler.dispatchMessage(Handler.java:110)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.os.Looper.loop(Looper.java:203)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.app.ActivityThread.main(ActivityThread.java:6337)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at java.lang.reflect.Method.invoke(Native Method)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1084)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:945)
06-05 14:22:14.051 16963 16963 E AndroidRuntime: Caused by: android.content.res.Resources$NotFoundException: File res/raw/sumup.bks from drawable resource ID #0x7f120006
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.content.res.ResourcesImpl.openRawResource(ResourcesImpl.java:311)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.content.res.Resources.openRawResource(Resources.java:1416)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.content.res.Resources.openRawResource(Resources.java:1355)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.Network.SSLPinningOkHttpClientFactory.readKeyStore(SourceFile:67)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.Network.SSLPinningOkHttpClientFactory.get(SourceFile:33)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.ToothpickCoreModule$1.get(SourceFile:33)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.ToothpickCoreModule$1.get(SourceFile:29)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.InternalProviderImpl.get(InternalProviderImpl.java:77)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.ScopeImpl.getInstance(ScopeImpl.java:58)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.ScopeImpl.getInstance(ScopeImpl.java:49)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.jsonRpcUtilities.JsonRpcHttpClient$$Factory.createInstance(SourceFile:15)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.jsonRpcUtilities.JsonRpcHttpClient$$Factory.createInstance(SourceFile:9)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.InternalProviderImpl.get(InternalProviderImpl.java:94)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.ScopeImpl.getInstance(ScopeImpl.java:58)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.ScopeImpl.getInstance(ScopeImpl.java:49)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.CoreState.get(SourceFile:431)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.Network.rpcManager$RpcThread.<init>(SourceFile:268)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.Network.rpcManager$RpcThread.<init>(SourceFile:264)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.Network.rpcManager.<init>(SourceFile:43)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.Network.rpcManager.Instance(SourceFile:77)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.ToothpickCoreModule$5.get(SourceFile:74)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.ToothpickCoreModule$5.get(SourceFile:71)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.InternalProviderImpl.get(InternalProviderImpl.java:77)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.ScopeImpl.getInstance(ScopeImpl.java:58)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.ScopeImpl.getInstance(ScopeImpl.java:49)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.controllers.CheckoutFlowController$$MemberInjector.inject(SourceFile:13)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.controllers.CheckoutFlowController$$MemberInjector.inject(SourceFile:9)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.InjectorImpl.inject(InjectorImpl.java:25)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at toothpick.Toothpick.inject(Toothpick.java:149)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.CoreState.inject(SourceFile:423)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.controllers.CheckoutFlowController.<init>(SourceFile:66)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.CoreState.createControllers(SourceFile:336)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.CoreState.<init>(SourceFile:120)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.CoreState.init(SourceFile:76)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at com.sumup.merchant.api.SumUpState.init(SourceFile:10)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1024)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.app.ActivityThread.handleBindApplication(ActivityThread.java:5590)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    ... 8 more
06-05 14:22:14.051 16963 16963 E AndroidRuntime: Caused by: java.io.FileNotFoundException: res/raw/sumup.bks
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.content.res.AssetManager.openNonAssetNative(Native Method)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.content.res.AssetManager.openNonAsset(AssetManager.java:444)
06-05 14:22:14.051 16963 16963 E AndroidRuntime:    at android.content.res.ResourcesImpl.openRawResource(ResourcesImpl.java:307)