0

In the process of trying to fix a bug in my code, I migrated my android project to androidx and foolishly 'unchecked' the backup option before migrating when it popped up. Now, the androidx project is causing more issues than it is helping, and I realize that I may not be able to undo this action since I did not backup the previous version.

Is there a way for me to get my project back to the way it was pre-migration to androidx? I have a version on github that is pre-migration (I did not commit the changes to github after migrating to androidx), so if I uninstall and reinstall Android Studio and pull the project from github, will it undo the androidx changes?

Any help will be greatly appreciated! Thank you in advance.

  • Does this answer your question? [Try to migrate AndroidX to Android AppCompat](https://stackoverflow.com/questions/54976440/try-to-migrate-androidx-to-android-appcompat) – Nicolas Jun 17 '20 at 01:10
  • "so if I uninstall and reinstall Android Studio and pull the project from github, will it undo the androidx changes?" yes, you don't even need to uninstall Android Studio. You could also look up how to undo uncommitted changes in git. – Ryan M Jun 17 '20 at 01:35

2 Answers2

0

You can try Refactor > Migrate to AppCompat...

But now AppCompat libraries are deprecated and there is no support from Google for it; so sooner or later you have to consider a migration plan.

Zain
  • 37,492
  • 7
  • 60
  • 84
0

Just revert the changes in version control. If you don't have such, revert the local history. While frankly speaking, when refactoring code, it is best to move forwards instead of backwards. As it is in this case ...else you won't ever get rid of the Jetifier, because one cannot mix appcompat with androidx. The reality is, that most current libraries meanwhile link against androidx.

Martin Zeitler
  • 1
  • 19
  • 155
  • 216