gregkorossy / Android-Support-Preference-V7-Fix

Android androidx.preference support library has some issues, this lib tries to fix them.
https://discord.gg/87NVsSK
Apache License 2.0
497 stars 47 forks source link

Fix warning exception #174

Closed tcqq closed 6 years ago

tcqq commented 6 years ago

@Gericop Open the application will display the following warning log.

2018-07-21 07:58:35.923 27035-27035/? W/System.err: java.lang.NoSuchFieldException: No field resId in class Landroid/support/v7/preference/PreferenceGroupAdapter$PreferenceLayout; (declaration of 'android.support.v7.preference.PreferenceGroupAdapter$PreferenceLayout' appears in /data/app/com.takisoft.preferencefix-wr6aw0u4qGwrh47WdI5XEw==/split_lib_dependencies_apk.apk)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at java.lang.Class.getDeclaredField(Native Method)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at com.takisoft.fix.support.v7.preference.PreferenceGroupAdapter.getReflectionFields(PreferenceGroupAdapter.java:42)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at com.takisoft.fix.support.v7.preference.PreferenceGroupAdapter.<init>(PreferenceGroupAdapter.java:33)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at com.takisoft.fix.support.v7.preference.PreferenceFragmentCompat.onCreateAdapter(PreferenceFragmentCompat.java:68)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v7.preference.PreferenceFragmentCompat.bindPreferences(PreferenceFragmentCompat.java:538)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v7.preference.PreferenceFragmentCompat.onViewCreated(PreferenceFragmentCompat.java:329)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1471)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.moveFragmentToExpectedState(FragmentManager.java:1784)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.moveToState(FragmentManager.java:1852)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.BackStackRecord.executeOps(BackStackRecord.java:802)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.executeOps(FragmentManager.java:2623)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.executeOpsTogether(FragmentManager.java:2410)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.removeRedundantOperationsAndExecute(FragmentManager.java:2365)
2018-07-21 07:58:35.924 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.execPendingActions(FragmentManager.java:2272)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.dispatchStateChange(FragmentManager.java:3271)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.support.v4.app.FragmentManagerImpl.dispatchActivityCreated(FragmentManager.java:3227)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.support.v4.app.FragmentController.dispatchActivityCreated(FragmentController.java:201)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.support.v4.app.FragmentActivity.onStart(FragmentActivity.java:610)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.support.v7.app.AppCompatActivity.onStart(AppCompatActivity.java:178)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.Instrumentation.callActivityOnStart(Instrumentation.java:1391)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.Activity.performStart(Activity.java:7152)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.ActivityThread.handleStartActivity(ActivityThread.java:2926)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.servertransaction.TransactionExecutor.performLifecycleSequence(TransactionExecutor.java:180)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.servertransaction.TransactionExecutor.cycleToPath(TransactionExecutor.java:165)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.servertransaction.TransactionExecutor.executeLifecycleState(TransactionExecutor.java:142)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:70)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1797)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:106)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.os.Looper.loop(Looper.java:193)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6642)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2018-07-21 07:58:35.925 27035-27035/? W/System.err:     at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
2018-07-21 07:58:35.926 27035-27035/? W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
gregkorossy commented 6 years ago

Will be fixed in v28.0.0.0

gregkorossy commented 6 years ago

Released v28.0.0.0