https://kotlinlang.org logo
Title
m

miqbaldc

04/12/2020, 11:18 PM
k

kevindmoore

04/13/2020, 12:55 AM
Did you use the tool in Android Studio to convert?
m

miqbaldc

04/13/2020, 8:20 AM
no, I’m using manual migration scripts inspired by Dan lew, Android Studio X migration tools takes a long time for me
c

Colton Idle

04/13/2020, 9:14 PM
The tool took a really long time for me. But I ran it and then followed up with the script from Dan lew... then it was a bunch of manually changes... and then it worked.
m

miqbaldc

04/14/2020, 5:01 AM
does the Migrate to AndroidX tools from Android Studio has same behaviour like the scripts? I’m not feeling okay with waiting too long on the first try, almost 4 hours and ticking, so I force close it T_T
l

louiscad

04/15/2020, 6:49 AM
Android Studio AndroidX migration tool is just SHIT. Just makes you lose time because it's not either SLOW or UNRELIABLE, it's BOTH! In my case, I manually updated the dependencies, added the properties for AndroidX and jetifier, then ran a homemade Kotlin script across all the modules.
m

miqbaldc

04/15/2020, 10:54 AM
did you publish publicly your kotlin script to the github repo? @louiscad
l

louiscad

04/15/2020, 11:11 AM
@miqbaldc Actually, there's even a Gradle plugin thanks to @jmfayard https://github.com/LouisCAD/Splitties/tree/49e2ee566730aaeb14b4fa9e395a677c3f214dba/plugin It's fast but doesn't support migrating dependencies at the moment, and lacks integration with #gradle-refresh-versions for it (that allows updating dependencies easily and quickly even in multi-modules project). It might not resolve the issue you're encountering, but speaking of Chuck, I'm using the library in a project using AndroidX with no problem.
👍 2
m

miqbaldc

04/15/2020, 2:11 PM
After using
Chucker
(the maintained version of
chuck
) yes, I don’t have any problems anymore for chuck. But, the issue still persist for a few library (e.g:
CleverTap
). I’ve been wondering, gradle caching might messed-up the jetified process. So, instead using the
jetified-*
aar version, AS keeps fetching/using the real one that still using Support Library. Stated in my SO Questions, the image I’ve provided, shown that
CleverTap
did works jetified. (see attached image) Unfortunately, when trying solving a common error situations: (invalidate cache, restart, clean, build, remove .idea & .gradle) seems not succeed for me. The AS (in Project structure view -> External Libraries) using original
CleverTap
still used instead of the jetified version.
l

louiscad

04/15/2020, 2:21 PM
@miqbaldc Which AS and which AGP version are you using?
m

miqbaldc

04/15/2020, 8:32 PM
AS & AGP both version using 3.6.2 @louiscad
l

louiscad

04/15/2020, 9:03 PM
@miqbaldc Can you confirm you have
android.enableJetifier=true
in the
gradle.properties
file in the root of the project, with no typo?
m

miqbaldc

04/15/2020, 9:10 PM
yes, here’s the proof. because the jetified works for “a few” library in my case, but failed for
CleverTap
(also others listed in my SO questions)
l

louiscad

04/15/2020, 9:12 PM
Would you try with AGP 4.0.0-beta04 from command line? They might have updated jetifier and added some fixes. If it's still not working, you can try with 4.1.0-alpha05, and if still not, then you need to report it with enough details, or better yet, a reproducing project on b.android.com (that I'll star if you link it here).
m

miqbaldc

04/15/2020, 9:15 PM
the latest beta version feb 2019: https://developer.android.com/jetpack/androidx/releases/jetifier i don’t think there’s any bugfix for the jetifier currently. cmiiw
I’ll try to create a reproduceable project this weekend, and submit a bug reports, only after trying both AGP 4.0.0 & 4.1.0 if not works either. Thank you very much @louiscad
It is weird bugs indeed: https://github.com/facebook/facebook-android-sdk/issues/591#issuecomment-619435280 I’m unable to create a repro project (because it succeed) and IDK why the
jetifier
“whitelisting” works for now @louiscad