AdevintaSpain / Leku

:earth_africa: Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
https://adevintaspain.github.io/Leku/
Apache License 2.0
763 stars 170 forks source link

Crash 3.2.0 to 3.4.1 #106

Closed AhmadullahSaikat closed 7 years ago

AhmadullahSaikat commented 7 years ago

After I upgraded the version of this library from 3.2.0 to 3.4.1 the application shows me following types of bugs in Applications onpause Method in every activity:

java.lang.AbstractMethodError: abstract method "void com.google.android.gms.internal.zzaac$zza.zzas(boolean)" at com.google.android.gms.internal.zzaac.zzas(Unknown Source) at com.google.android.gms.internal.zzaac.onTrimMemory(Unknown Source) at android.app.Application.onTrimMemory(Application.java:134) at android.app.ActivityThread.handleTrimMemory(ActivityThread.java:4632) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1676) at android.os.Handler.dispatchMessage(Handler.java:111) at android.os.Looper.loop(Looper.java:207) at android.app.ActivityThread.main(ActivityThread.java:5728) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:679) 08-08 15:24:35.075 818-878/? E/WifiConfigStore: updateConfiguration freq=2412 BSSID=6c:19:8f:c8:87:88 RSSI=-51 "TopOfStack Link3 2.4"WPA_PSK

ferranpons commented 7 years ago

Which version of play services do you have?

AhmadullahSaikat commented 7 years ago

10.2.1

            Address fullAddress = data.getParcelableExtra(LocationPickerActivity.ADDRESS);

            String countryCode = fullAddress.getCountryCode();

Api 23 DeviceName: WE crash.

                                                                       Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.location.Address.getCountryCode()' on a null object reference

When I click on check button this always returns this crash..

One more things:

It shows Only CoOrdinates. Not Showing Location Name in GoogleMap.

ferranpons commented 7 years ago

@AhmadullahSaikat are you using the Poi feature? .withPois(getLekuPois())

AhmadullahSaikat commented 7 years ago

No I didn't use that....

AhmadullahSaikat commented 7 years ago

at 3.4.3 you didn't remove the crash..

device-2017-09-10-124036

when I click on OK button this crash happens:

                                                                     java.lang.RuntimeException: Failure delivering result ResultInfo{who=null, request=2, result=-1, data=Intent { (has extras) }} to activity {com.muslim.quran_bangla/com.muslim.prayerTimes.FirstActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.location.Address.getCountryCode()' on a null object reference
                                                                         at android.app.ActivityThread.deliverResults(ActivityThread.java:3646)
                                                                         at android.app.ActivityThread.handleSendResult(ActivityThread.java:3689)
                                                                         at android.app.ActivityThread.access$1300(ActivityThread.java:151)
                                                                         at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1362)
                                                                         at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                         at android.os.Looper.loop(Looper.java:135)
                                                                         at android.app.ActivityThread.main(ActivityThread.java:5345)
                                                                         at java.lang.reflect.Method.invoke(Native Method)
                                                                         at java.lang.reflect.Method.invoke(Method.java:372)
                                                                         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:947)
                                                                         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:742)
                                                                      Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.location.Address.getCountryCode()' on a null object reference
                                                                         at com.muslim.prayerTimes.FirstActivity.onActivityResult(FirstActivity.java:864)
ferranpons commented 7 years ago

@AhmadullahSaikat as I see in the screenshot the code that has the NPE is from your app. You are trying to get the Country Code when the Address object hasn't got it onActivityResult.

About the problem with only displaying coordinates it's already solved in the version 3.4.4.

AhmadullahSaikat commented 7 years ago

Thanks for solving crash....