Status Update
Comments
ja...@gmail.com <ja...@gmail.com> #2
The problem does not occur using androidx.preference:preference:1.0.0 in place of androidx.preference:preference:1.1.0-alpha01
ku...@google.com <ku...@google.com>
ku...@google.com <ku...@google.com> #3
Thank you for reporting this issue. We have shared this with our product and engineering team and will update this issue with more information as it becomes available.
lp...@google.com <lp...@google.com> #4
Hi,
This is due to a bug present in the androidx fragment library.
We will depend on a fixed version of androidx.fragment in a future release of the preference library, but for now you can manually specify:
'androidx.fragment:fragment:1.1.0-alpha02'
in your build config and this should fix this issue.
This is due to a bug present in the androidx fragment library.
We will depend on a fixed version of androidx.fragment in a future release of the preference library, but for now you can manually specify:
'androidx.fragment:fragment:1.1.0-alpha02'
in your build config and this should fix this issue.
ja...@gmail.com <ja...@gmail.com> #5
I tried to change from alpha01 to alpha02, but the build fails with following error:
Failed to resolve: androidx.preference:preference:1.1.0-alpha02
Instead build works correctly with alpha01.
Failed to resolve: androidx.preference:preference:1.1.0-alpha02
Instead build works correctly with alpha01.
lp...@google.com <lp...@google.com> #6
Preference hasn't released alpha02 yet, you should keep that as alpha01. But you need to add in a separate line:
androidx.fragment:fragment:1.1.0-alpha02
So from the sample project you uploaded, the app/build.gradle should look like this at the bottom:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.preference:preference:1.1.0-alpha01'
// new
implementation 'androidx.fragment:fragment:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
You will not have to do this in the next release of Preference library - apologies for this workaround in the meantime.
androidx.fragment:fragment:1.1.0-alpha02
So from the sample project you uploaded, the app/build.gradle should look like this at the bottom:
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.preference:preference:1.1.0-alpha01'
// new
implementation 'androidx.fragment:fragment:1.1.0-alpha02'
implementation 'com.google.android.material:material:1.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
You will not have to do this in the next release of Preference library - apologies for this workaround in the meantime.
lp...@google.com <lp...@google.com> #7
Preference alpha02 has been released and uses a newer version of the Fragment library without this issue. See https://developer.android.com/jetpack/androidx/androidx-rn#2018-dec-17-pref for more information.
lp...@google.com <lp...@google.com> #8
This still exists due to a separate issue present in Fragment - marking this bug as duplicate to aid tracking.
Seehttps://issuetracker.google.com/issues/122167543 for the new tracking bug to follow.
See
Description
Version used: 1.1.0-alpha01
Theme used: Theme.AppCompat.Light.DarkActionBar
Devices/Android versions reproduced on: tested on Android SDK 17 and 25 (didn't try other versions)
How to reproduce the problem:
1) Launch the application and click on 'Interlinea' option, the application shows the ListPreference 'Interlinea' correctly.
2) Rotate left the device, the ListPreference is correctly displayed
3) Rotate right the device, the NPE occurs, see log.txt attached
Mini-project to reproduce the bug is included in Sandbox.zip