Assigned
Status Update
Comments
mo...@gmail.com <mo...@gmail.com> #2
My dependencies:
implementation 'androidx.appcompat:appcompat:1.4.0'
implementation 'androidx.preference:preference:1.1.1'
implementation 'com.google.android.gms:play-services-wearable:17.1.0'
implementation 'com.google.android.material:material:1.4.0'
If I remove androidx.appcompat:appcompat:1.4.0
, the warning vanishes, so I imagine there's some transitive dependency on an older version of androidx.appcompat:appcompat
that doesn't have the warning.
Description
With instructions like that, people have tendency not to migrate to Datastore.
Major issues:
- bundle (Module): no explanation protobuf id has to be imported at the top, protobuf plugin has to be imported and most importantly, that at the end of the file protobuf has to be defined (configuration of the Protobuf compilation and the protoc executable)
- why is in the same section of the code as object Serializer also this part?:
val Context.settingsDataStore: DataStore<Settings> by dataStore(
fileName = "settings.pb",
serializer = SettingsSerializer
)
makes no sense.
-no explanation to check after build that proto stuff is generated under build/generated/source/proto
Other issues:
- where does Serializer file object should be in the project?
I had to check quite many articles to finally manage to get things working.
And yes there is also codelab for this
but sadly that one is also outdated. For example, configuration of Protobus has a line:
all().each { task ->
which actually should be:
all().forEach { task ->
I understand, sure, you cannot keep really all documentation up to date. But if you want people to migrate from SharedPreferences to Datastore, this documentation is, sorry to say, a failure.