sumup / sumup-android-sdk

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

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

Open vladaman opened 1 year 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 11 months ago

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

benjaminpollard commented 10 months 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 4 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 4 months ago

Did anyone find the optimal solution for this issue?

nicobritos commented 2 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 1 month ago

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