https://kotlinlang.org logo
#splitties
Title
# splitties
t

Tankraj Joshi

08/21/2019, 5:53 AM
am i adding the right dependency?
l

louiscad

08/21/2019, 7:13 AM
Is your project using AndroidX?
t

Tankraj Joshi

08/21/2019, 7:14 AM
no, i haven't migrated to androidx yet
l

louiscad

08/21/2019, 7:25 AM
@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

Tankraj Joshi

08/21/2019, 9:13 AM
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

louiscad

08/21/2019, 9:15 AM
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

Tankraj Joshi

08/21/2019, 9:19 AM
exactly , i amde a demo Ui activity extending Ui class, but dont know how to preview it?
l

louiscad

08/21/2019, 9:46 AM
You can't preview an
Activity
class.
t

Tankraj Joshi

08/21/2019, 9:46 AM
ok i got it i did it by creating a xml class
l

louiscad

08/21/2019, 9:46 AM
There's a documentation for Views DSL IDE Preview
There's no such thing as an xml class
t

Tankraj Joshi

08/21/2019, 9:46 AM
thank you , 😊
l

louiscad

08/21/2019, 10:53 AM
Is it going well?
3 Views