4

I have a major issue with Android development on Windows 7. I was working with some Nativescript app for about a month, until Android studio performed some routine update, few days ago. Since then, i'm unable to get the environment running: Every time i open the Emulator, adb.exe "stops working" after the phone loads. I tried following the steps recommended here: How to completely uninstall Android Studio from windows(v10)?

No success. I reinstalled Android studio and android SDK multiple times. I tried also different emulator images- same result.

I will mention, that my SDK was installed initially using choco, as instructed in the Nativescript docs:

choco install android-sdk -y

Now, every time i want to reinstall it, i need to add the --force flag.

Bottom line: How can i completely reset my system to the state before any Android development environment was installed, in order to rectify this situation? Following the steps in the above link didn't help. There's probably something interfering.

Any ideas? I cant develop anything...

i.brod
  • 3,993
  • 11
  • 38
  • 74
  • when i faced the same problem. i created new blank project deleted its app folder and copy pasted the app folder from crashed app, it worked fine. and i don't know what causing problem whether the code i have written or any other things. multiple times i faced the problem then i upgraded to windows 10. Bingo no problem till the day. so my advice is to go for windows 8 or 10. – Vikas Acharya Jun 09 '19 at 14:52
  • Heh well...buying new windows is out of the question. Regarding the app folder: what do you mean? What app folder? what crashes is a clean and freshly installed emulator, no app installed on it. – i.brod Jun 09 '19 at 15:18
  • have you checked the abd where it is located. usually it will be located "C:\Users\username\AppData\Local\Android\sdk\platform-tools". can you confirm are you pointing to right location. – Vikas Acharya Jun 10 '19 at 05:11
  • I have it in C:\Android\android-sdk\platform-tools. Do i need some some environment variable for it? What do u mean by "pointing"? – i.brod Jun 10 '19 at 16:04

1 Answers1

8

Had the same issue recently, adb.exe just started and kept crashing after installation of some updates offered by Android Studio.

What helped was manual re-installation of platform-tools, back to version 28.

So steps:

1) https://dl.google.com/android/repository/platform-tools_r28.0.0-windows.zip - download previous version of platform tools;

2) navigate to %AppData%\..\Local\Android\Sdk\platform-tools;

3) replace all files inside this folder with files from zip archive of version 28 downloaded in step 1.

Other steps I've tried before: full re-installation of Android Studio, SDK, emulators and so on, but I believe the actual fix was reverting back to platform-tools version 28.

After that my emulators (API 28, Android 9.0) went back to life.

aleor
  • 286
  • 2
  • 5
  • LOL it worked :D Thank you so much. I was actually suspecting something like this...every time i saw this number "29", it didn't sit right with me. The problem is that this whole system has so many parts to it, that i don't even know what is what, and what exactly i was installing/reinstalling... – i.brod Jun 11 '19 at 13:46
  • This looks like working too for downgrading from 31.0.3 to 30.0.0. Huge thanks! – datiKaa Nov 05 '21 at 14:20