Recently Android team(mainly those guys actually) had introduced androidx.core:core-ktx:1.0.0
.
I've added it to mine project :
implementation 'androidx.core:core-ktx:1.0.0'
Everything looks cool, despite few moments - I can't find the toast()
method. After few minutes of research I've found that androidx.core.widget
package isn't anymore present within the ktx lib. There is nothing about it mentioned inside Changelog file. That's kind of strange, cause it was there within androidx.core:core-ktx:1.0.0-alpha1
version.
BTW the same strange behaviour applies to
As usual after few hours of playing with Android Studio(using diff lib versions and invalidating cache) things went back to normal. Problem with styles isn't valid anymore.com.google.android.material:material:1.0.0
where in beta01
I was able to use MaterialComponents
-styles and in the release version Android Studio isn't able to resolve them.
Soooo, the question is:
What was done? Do we have any up to date doc describing all relevant changes?
As this library was archived and partially moved to support, you can see in https://github.com/android/android-ktx/issues/143 that toast()
is removed. So you can downgrade the library to androidx.core:core-ktx:1.0.0-alpha1
(beta01 or even 0.3).
I don't know, why this happened.
beta01
warns that toast()
should be replaced with Toast.makeText(this, message, Toast.LENGTH_SHORT).show();
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With