Comments (21)
Well, I tested 24.1.0.1 on the AWS Device Farm's Note 3 with 4.4.2 and no crash happened.
from android-support-preference-v7-fix.
Yeah, this definitely looks like a reflection problem. I wonder what can cause this as there were no changes to the preference part of the support library...
from android-support-preference-v7-fix.
I guess the fields are in place, but probably something in the parent class happens before the initialization of the fields and it tries to use them.
I have an idea to try and resolve them later, but I don't have a device I could test it on (none of the emulators nor my devices produce this bug).
from android-support-preference-v7-fix.
I committed it, if you could test it, that'd be awesome!
from android-support-preference-v7-fix.
Thanks for the fast response! I'll reach the user and ask him to test.
from android-support-preference-v7-fix.
So, it's now on jcenter too. Look for the version number 24.1.0.1.
from android-support-preference-v7-fix.
I contacted the user and sent him an APK with the new version of the preferences. Still crashes. Same stacktrace.
Looking at the code it could fail in 3 different ways:
- The for doesn't execute once
- The if evaluates false everytime
- getDeclaredField returns null
I can't reproduce this in any way, don't know how to debug the problem. There's also so much I can ask the user to test. Really weird issue.
from android-support-preference-v7-fix.
I'll try to reproduce it on AWS Device Farm. It has a 4.4.2 Note 3 device, so hopefully it will crash there too.
from android-support-preference-v7-fix.
Haven't tried it yet, but seems like Google has released v24.1.1 of the support library (it's not on their revision history page at the time of writing this comment).
from android-support-preference-v7-fix.
I guess it could be because of Xposed. I really don't know. I'll stay in 23.4.0.5.
from android-support-preference-v7-fix.
I'd recommend against that as eventually you will probably have to use the 24 versions anyways.
If your user uses Xposed, that's basically out of anyone's reach. Anything that interferes with the Android system is a hazard to any application. I don't know the Xposed internals but if it overrides reflections by changing the name of the fields, that's just wtf.
from android-support-preference-v7-fix.
Xposed is like system hooks. Just ignore those.
from android-support-preference-v7-fix.
It's interesting though. If I could grab that device, I'd check the reflection things, like what's the name of the fields / classes being resolved.
from android-support-preference-v7-fix.
Yeah, eventually I'll have to update. It's not a must right now because I was only doing it for the preference category bottom margin.
It only happens to this one user, but if I update it, it completely kills the settings for him as he can't open anything at all.
And 24.1.1 doesn't seem to fix the problem. The patch notes are out.
from android-support-preference-v7-fix.
I can create a quickfix that makes it fall back to the original implementation when the reflection doesn't work, but that means no padding fix until the guys at Google fix it.
from android-support-preference-v7-fix.
So, the new version (24.1.1.0) is available on gradle. It contains the aforementioned quickfix so if you want to use v24 without crashing that user, he/she won't encounter now the crash but see the non-padding-fixed version of the preferences.
from android-support-preference-v7-fix.
v24.2.0.0 has been released, update your gradle file:
compile 'com.takisoft.fix:preference-v7:24.2.0.0'
If you can, please check whether the bug still persists.
from android-support-preference-v7-fix.
Ah sorry, I totally forgot about this. Will update and ask the user if everything is okay.
from android-support-preference-v7-fix.
Seems to be working fine. When it is going to crash it ignores the margin and works fine. Thanks!
from android-support-preference-v7-fix.
Yes, because the new one falls back to the original (paddingless) implementation on failure. Hopefully Google fixes the official lib soon...
from android-support-preference-v7-fix.
This happened also to me on a sony xperia with android 4.4.4 and version 24.1.0.1
But I noticed that without proguard it worked fine.
Updated to the version 24.2.0.0 and is working fine either with proguard too.
from android-support-preference-v7-fix.
Related Issues (20)
- .setcancelable for Dialog? HOT 1
- how to show divider between preference when merged to androidX-1.0.0/support-28 HOT 1
- ColorPickerPreference dialog style HOT 1
- how to get items from custom view HOT 1
- [AndroidX] android:dependency doesn't change color of preference HOT 5
- PreferenceScreen deprecated in Android Q HOT 2
- Request to update the version of the preference library HOT 5
- Broken when using with latest AndroidX material alpha05 and appcompat alpha04 HOT 8
- keyboard do not hide when cancel button is clicked of editTextPreference HOT 2
- Issue with themes HOT 3
- NullPointerException in PreferenceFragmentCompat.traverseAndRefreshPrefs()
- Popup menu android doesn't work correctly HOT 1
- NumberFormatException in RingtonePreferenceDialogFragmentCompat HOT 7
- AndroidX 1.1.0 HOT 4
- Expand/Contract PreferenceCategory HOT 3
- Question about migrating from library fix:preference-v7:28.0.0.0 to preferencex:preferencex:1.1.0
- How do you get the value from ColorPickerPreference
- Exception: java.lang.NumberFormatException HOT 1
- How to add a ad in a Preference Screen? HOT 1
- ListPreference Crash on theme change (Light to Dark or Vice versa) HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from android-support-preference-v7-fix.