Type mismatch: inferred type is but was expected

Issue I’m new to Kotlin and here is my problem: I use dataBinding in my app and When I want to set my variable from layout: <?xml version=”1.0″ encoding=”utf-8″?><layout xmlns:android=”http://schemas.android.com/apk/res/android” xmlns:tools=”http://schemas.android.com/tools” xmlns:app=”http://schemas.android.com/apk/res-auto”> <data> <import type=”android.view.View”/> <variable name=”noteViewModel” type=”moeindeveloper.kotlinroomaac.ViewModel.NoteViewModel” /> </data>

Continue reading

Caused by: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero)

Issue When launching an activity my app crashes at getEncryptedSharedPrefs: if(getEncryptedSharedPrefs().getString("pinSettingsLogin", "")!!.isEmpty()){ getEncryptedSharedPrefs().edit() .putString("pinSettingsLogin" , "0000") .apply() } With this error: Caused by: com.google.crypto.tink.shaded.protobuf.InvalidProtocolBufferException: Protocol message contained an invalid tag (zero). Weird thing is, this if statement works on Android

Continue reading