android-PlacesAutocompleteTextView
android-PlacesAutocompleteTextView copied to clipboard
Proguard rule needed
I´m building a release build but cannot get past his proguard related error:
Process: com.toy.android.production, PID: 13817
java.lang.NullPointerException: Attempt to read from field 'java.lang.Object android.widget.Filter$FilterResults.values' on a null object reference
at com.seatgeek.placesautocomplete.adapter.PlacesApiFilter.publishResults(SourceFile:120)
at android.widget.Filter$ResultsHandler.handleMessage(Filter.java:282)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:158)
at android.app.ActivityThread.main(ActivityThread.java:7225)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)
In my proguard-rules.pro file I have the:
-keep class com.seatgeek{ *; } -keep public class com.toy.android.ui.adapter.PlacesAutocompleteAdapter{ *; }
What am I missing please advice
I worked it out to this:
-keep class com.seatgeek.**{ ; } -keep public interface com.seatgeek.placesautocomplete.history.AutocompleteHistoryManager{;}
Don´t know why I have to explicita keep this interface but it took two days to find the it
Going to reopen this, I think it'd be a good idea for us to package proguard rules in our AAR
thanks great
@sddamico I am pretty sure that just
-dontwarn com.squareup.okhttp.**
should be enough. See here for reference
I am using this library but after enable proguard my application force close android.view.InflateException: Binary XML file line #65: Binary XML file line #65: Error inflating class com.seatgeek.placesautocomplete.PlacesAutocompleteTextView at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3319) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3415) at android.app.ActivityThread.access$1100(ActivityThread.java:229) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1821) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:148) at android.app.ActivityThread.main(ActivityThread.java:7325) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120) Caused by: android.view.InflateException: Binary XML file line #65: Binary XML file line #65: Error inflating class com.seatgeek.placesautocomplete.PlacesAutocompleteTextView
and i m already use -keep class com.seatgeek.**{ ; } -keep public interface com.seatgeek.placesautocomplete.history.AutocompleteHistoryManage -keep public class com.toy.android.ui.adapter.PlacesAutocompleteAdapter{ *; }
Please give some solution much needed Thanks in advance.
keeping com.seatgeek.**
is generally overly broad, should narrow it down to:
-keep class com.seatgeek.placesautocomplete.model.** { *; }
for json mapping