Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issue running Android Studio emulator: git set up launches and tries to downgrade

I am currently working on a flutter application using Android Studio. When I try to run the file or use the emulator, the Git set up prompt appears. I have git installed to the latest version (Git 2.30.0.2), but the set up prompt tries to install an older version:

Git for Windows 2.30.0.2 is currently installed. Do you really want to downgrade to Git for Windows 2.14.1?

A few days ago Android Studio was working fine and now I have this issue. I assume it might have something to do with Android Studio not being able to find the git location (so it might be an issue with the git path).

Even so, I don't know how that could be possible. This problem showed up suddenly, I had already ran the emulator multiple times on a project (let's call it Project 1) and it worked fine. When I tried to load another project (Project 2) the git set up prompt appeared. When I went back to run Project 1, I had the same issue there.

Any help would be greatly appreciated,

TT

like image 623
Théodore Tremblot Avatar asked Feb 11 '26 10:02

Théodore Tremblot


1 Answers

I see that error message in git-for-windows/build-extra installer/install.iss

It pops up just after querying the Windows registry:

HKEY_LOCAL_MACHINE,
'Software\GitForWindows',
'CurrentVersion',
PreviousGitForWindowsVersion

And when the IsDowngrade(CurrentVersion:String):Boolean somehow return true because the current version from the registry is different from the current one.

Forcing the previous version to be empty would side-step this issue.

like image 181
VonC Avatar answered Feb 13 '26 02:02

VonC



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!