# Ch. 8 PreferenceManager Deprecated

**URL:** <https://forums.kodeco.com/t/ch-8-preferencemanager-deprecated/85542>\
**Category:** Android Apprentice\
**Created:** [October 20, 2019, 1:23am UTC](https://forums.kodeco.com/t/ch-8-preferencemanager-deprecated/85542 "2019-10-20T01:23:54Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![kdewitt](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kdewitt/32/81494_2.png) [@kdewitt](https://forums.kodeco.com/u/kdewitt)\
**Post date:** [October 20, 2019, 1:23am UTC](https://forums.kodeco.com/t/ch-8-preferencemanager-deprecated/85542/1 "2019-10-20T01:23:54Z")

</div>

Everything is working as described in the book but I’m wondering what changes I need to make to account for the deprecation of the PreferenceManager class.

Amongst other things I tried importing `androidx.preference.PreferenceManager` instead of `android.preference...` per [this SO post](https://stackoverflow.com/a/56833739/774793) but that only resulted in an unresolved reference to `preference`.

I fear I’m a bit out of my league here, or I’m missing some fundamentals. Your iOS Apprentice book was much easier to follow as a complete novice iOS programmer. I’d hoped this book would be equally enlightening. Is there another book I should be starting with for Android development? Kotlin Apprentice was next on my list. Perhaps I should have started there.

Thanks for all your hard work putting these books together!

Kenny

Edit:  
So I found and ran Refactor-\>Migrate to AndroidX…

and added `implementation 'androidx.preference:preference-ktx:1.1.0'` to `build.gradle`

After a few additional minor updates and a rebuild I seem to be in good shape.

Guess I jumped the gun posting here. Unless of course this was the wrong course of action…

Thanks again!

---

<div class="post-metadata">

**Author:** ![daemonic\_daz](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/daemonic_daz/32/108563_2.png) [@daemonic\_daz](https://forums.kodeco.com/u/daemonic_daz)\
**Post date:** [October 20, 2019, 6:45pm UTC](https://forums.kodeco.com/t/ch-8-preferencemanager-deprecated/85542/2 "2019-10-20T18:45:35Z")

</div>

Hi kdewitt,

Welcome to the forums and well done on figuring out the issue yourself. Using Migrate to AndroidX was the right thing to do. 😃

You’ve picked up on something we need to do, update the book to use the AndroidX libraries. We intend to do this and I’ll share this thread with the rest of the team to show we need to do it soon.

For other books dedicated to beginning Android development, we suggest checking the Big Nerd Ranch Android book. It has a similar approach to our own and a lot of the team highly rate their books.

> **[Books - Big Nerd Ranch](https://bignerdranch.com/books/)**
>
> Our Books are some of the best resources for programmers diving into mobile app and web development. Learn how we can help with your next digital product!

Thanks,

Darryl

---

<div class="post-metadata">

**Author:** ![daemonic\_daz](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/daemonic_daz/32/108563_2.png) [@daemonic\_daz](https://forums.kodeco.com/u/daemonic_daz)\
**Post date:** [October 20, 2019, 6:50pm UTC](https://forums.kodeco.com/t/ch-8-preferencemanager-deprecated/85542/3 "2019-10-20T18:50:08Z")

</div>

@kdewitt One more thing. Was there anything in particular about the book you thought or felt wasn’t enlightening enough? We’re keen on making sure the book is the best it can be. 😄

---

<div class="post-metadata">

**Author:** ![kdewitt](https://assets.chunter.kodeco.com/user_avatar/forums.kodeco.com/kdewitt/32/81494_2.png) [@kdewitt](https://forums.kodeco.com/u/kdewitt)\
**Post date:** [October 20, 2019, 11:18pm UTC](https://forums.kodeco.com/t/ch-8-preferencemanager-deprecated/85542/4 "2019-10-20T23:18:13Z")

</div>

Thanks for the reply, @daemonic_daz

My remark comparing the two books was poorly worded. The Android Apprentice book is _very_ enlightening. I suppose my innate preference for Apple combined with my frustration level got the better of me.

Thanks again to the entire team for all the hard work!

Kenny
