Androidx, Who Would’ve Thought? 80 of 100 Days of…
Last time I blamed Google and TECHNICALLY, I was right.
You can find a video of this at the bottom of the page and a link to the source code here.
After my attempt to implement the Firebase and Realtime Database SDKs failed, I tried updating my Android Manifest as suggested by Android Studio. When that failed, I undid my changes and searched for a solution.
I searched duckduckgo using the error statement from Android Studio. The first result on Stackoverflow was someone with the same issue. They ran into it every time they tried to build their app. The only fix was to migrate to Androidx to update their application with the proper code.
After creating a backup, I refactored the project and migrated it to Androidx. After syncing the project, the build was successful! (click below)
The Salesman’s Travel app still used the original support library APIs since I created it well before Android Studio automatically created projects using Androidx. However, in order to integrate the Firebase and Realtime Database SDKs, the project required this migration. This way, the app could use the up-to-date support library APIs. After the migration, I could see the changes across various classes in my project (click below).
I did say that some new feature or dependency was missing from my project, and I was right! Now that everything works as expected, I’ll continue moving forward with the Realtime Database implementation as planned.
Join the mailing list to see updates like this every week!
Coding Fanatic
Special thanks to Khemraj on StackOverflow! You can find the troubleshooting post here and more info on Androidx here!