am i adding the right dependency?
# splitties
t
am i adding the right dependency?
l
Is your project using AndroidX?
t
no, i haven't migrated to androidx yet
l
@Tankraj Joshi Then you'll need to proceed before using Splitties 3.0+ Here's what to do: 1. Remove the Splitties dependency 2. Make sure your git state is clean 3. Make sure you use Android Studio 3.5 and Android Gradle Plugin 3.5.0 (released just yesterday FYI) 4. Solution A: Use the Refactor to AndroidX IDE option (warning: it might be very slow and might not work correctly if they didn't fix it since then) 5. Solution B: Follow this guide I set up in Splitties first AndroidX version: https://github.com/LouisCAD/Splitties/releases/tag/v3.0.0-alpha01 The Kotlin script I put there to migrate takes less than a minute to complete. (warning: it doesn't update dependencies automatically so you'll need to do it by hand) In case of any problem, don't hesitate to revert from the commit window in IDE and start over.
t
so i have migrated my project to android x and now i have anko layouts, so what process may i do to migrate my ui to Views dsl and preview them?
l
Read Splitties Views DSL doc on GitHub so you know it all and can proceed confidently.
You can also embed your anko layouts into a
Ui
implementation to preview them in the IDE
t
exactly , i amde a demo Ui activity extending Ui class, but dont know how to preview it?
l
You can't preview an
Activity
class.
t
ok i got it i did it by creating a xml class
l
There's a documentation for Views DSL IDE Preview
There's no such thing as an xml class
t
thank you , 😊
l
Is it going well?