sumup / sumup-android-sdk

Sample App for the SumUp Android SDK
Other
107 stars 28 forks source link

App Crash on SDK 4.1.0 with no Google Play Services - Location Services #207

Closed vladaman closed 1 month ago

vladaman commented 1 year ago

Android SDK: 23 SumUp SDK: 4.1.0

In the event that no Google Play services are installed on an Android device, the app will crash and display the following error message:

Fatal Exception: java.lang.IncompatibleClassChangeError: The method 'com.google.android.gms.tasks.Task com.google.android.gms.location.FusedLocationProviderClient.getLocationAvailability()' was expected to be of type virtual but instead was found to be of type interface (declaration of 'com.sumup.base.common.location.GoogleLocationServicesManager' appears in /data/app/com.myapp-2/base.apk:classes3.dex)
       at com.sumup.base.common.location.GoogleLocationServicesManager.updateLatestLocation(GoogleLocationServicesManager.java)
       at com.sumup.base.common.location.GoogleLocationServicesManager.getLatestLocation(GoogleLocationServicesManager.java)
       at com.sumup.merchant.reader.network.rpcActions.rpcAction.addLocation(SourceFile:1)
       at com.sumup.merchant.reader.network.rpcActions.rpcAction.<init>(SourceFile:159)
       at com.sumup.merchant.reader.identitylib.network.rpcActions.rpcActionLogin.<init>(SourceFile:1)
       at com.sumup.merchant.reader.identitylib.network.rpcActions.rpcActionLoginWithPassword.<init>(SourceFile:1)
       at com.sumup.merchant.reader.identitylib.ui.activities.LoginActivity.logInWithPassword(SourceFile)
       at com.sumup.merchant.reader.identitylib.ui.activities.LoginActivity.handleLogIn(SourceFile:53)
       at com.sumup.merchant.reader.identitylib.ui.activities.LoginActivity.doAutoLogin(SourceFile:2)
       at com.sumup.merchant.reader.identitylib.ui.activities.LoginActivity.onCreate(SourceFile:118)
       at android.app.Activity.performCreate(Activity.java:6267)
       at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
       at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
       at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
       at android.app.ActivityThread.-wrap11(ActivityThread.java)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:148)
       at android.app.ActivityThread.main(ActivityThread.java:5417)
       at java.lang.reflect.Method.invoke(Method.java)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:772)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:662)
okirmis commented 1 year ago

Same issue occurs with up-to-date play services (v21.0.1).

mlabey commented 1 year ago

Same issue : 'com.sumup:merchant-sdk:4.2.0' / 'com.google.android.gms:play-services-location:21.0.1'

benjaminpollard commented 1 year ago

To fix this downgrade your com.google.android.gms:play-services-location to 20.0.0, or 19.0.1. Sum up needs to update their dependencies

abdullahafzaldev commented 9 months ago

Still the same issue

java.lang.IncompatibleClassChangeError: Found interface com.google.android.gms.location.FusedLocationProviderClient, but class was expected (declaration of 'com.google.android.gms.location.FusedLocationProviderClient' appears in /data/app/kiosk.spont.nl-ze6gqZFK2BXCH5IYSRaP0g==/base.apk!classes21.dex)

abdullahafzaldev commented 9 months ago

Did anyone find the optimal solution for this issue?

nicobritos commented 7 months ago

Hi! We have the same issue, and makes this SDK incompatible with other libraries that need the updated version of play-services-location

Can we get this fixed? @zaid-abdullah

Anquuni commented 6 months ago

We had the same problem, but SumUp fixed it with the new version 5.0.0

milenpav commented 1 month ago

Same here but with version 'com.sumup:merchant-sdk:5.0.2' and 'com.google.android.gms:play-services-location:20.0.0'

zaid-abdullah commented 1 month ago

Please refer to the release notes of https://github.com/sumup/sumup-android-sdk/releases/tag/v5.0.0 It updates the play-services-location dependency which has incompatibility issues when integrators are using a higher version.