I am a flutter developer and I wanted to clear reinstall the android with the latest version so I deleted android studio from the control panel from my windows os and then when I reinstalled my android studio everything got back as is when I deleted and I don't know why but then I deleted all related files from my storage I deleted filed form program files, the user (.android and .gradle ) then also from app data also from local and roaming and then I tried to reinstall it but the thing was as it is and I have done this several times but I can't seem to understand why it is happening
First of all Uninstall android studio from the Settings.
Go to the location where your SDK is installed. In my case, I found it here C:\Users\ACER\AppData\Local\Android. Delete the android folder.
Now in your user files, delete the .android, .gradle, such folders.
Now go to AppData and delete the folder named Google.
Restart your PC once.
Note: You can also delete the project files if you want.
If this doesn't help try reinstalling Flutter.
Search android studio in the Start window and delete all files.
On the user directory C:\Users\USERNAME, you also need to delete all directories starting by '.AndroidStudio'.
Android Studio create those directories after each update, as backup. And will restore the backup after reinstall if present.
Related
I'm using a sqlite database as an asset in my Android project that I'm trying to manually update, but my older version always comes back.
On my Pixel 5 I tried to:
Delete the app before reinstalling from Visual Studio debugger.
Go in the phone's storage, find the app and delete cache and data, then proceed to uninstall and finally reinstall from Visual Studio.
Reboot the phone after uninstalling.
In Visual Studio I tried to:
Cleaning entire solution & rebuilding it after deleting older database and after adding the new one.
Do my first step, close Visual Studio delete Bin & Obj folders and relaunch VS.
Found that when reinstalling the app, my phone would use a backup it automatically did on my Google Drive.
I had to delete the backup, and then it was working fine.
I am trying to free up some space on my hard drive. I've noticed that i have .android folder in my home folder on my mac. Does anyone know is it safe to delete this folder? And what exactly is it? It's 10Gb in size. I did use Android Studio on a school project but I don't use it anymore and I've uninstalled Android Studio since then. I don't have any android devices eighter.
Please don`t delete .android because this folder contain some setting that enable app to be installed and run on android emulator or device.
If you delete this folder, apk installation will be rejected during installation in the android device or emulator.
That is what I experienced after delete this folder.
Normally, it is created when you plug an Android device to your computer, and also it is the default location for the AVD as pointed by Gabriele in the comments. Find some insights in the next links:
https://developer.android.com/studio/run/emulator-commandline#data-filedir
https://askubuntu.com/questions/617912/what-are-the-android-folders-and-adbkey-files-on-my-computer
Cheers!
You can safely delete this folder at any time (except maybe while Android Studio is still running!)
All that will happen is that next time you use Android Studio:
it will need to re-download some stuff.
you might have to uninstall dev builds of apps on your phone and reinstall them again due to a change in keys.
you will lose any data and save states of emulators you were using.
I was cleaning my system from unused application then I found that c:\user\mysystem\AndroidStudio2.3 , c:\user\mysystem\AndroidStudio3.0 files are in my system while I updated the Android Studio two months ago to 3.0 version. So can I delete c:\user\mysystem\AndroidStudio2.3 this file?
Other then that there are two another folders are also available occupying the system memory c:\user\mysystem\.android and c:\Android.
This c:\Android folder have the SDK and this folder c:\user\mysystem\.android is for what? Can I delete it also?
I have deleted the older version's folder of android studio c:\user\mysystem\AndroidStudio2.3 and nothing goes wrong.
While in the c:\user\mysystem\.android contain all cache data and all the emulator data in this folder while deleting this folder. This deletes all your cache and the emulator data. But when you running Android Studio it regenerates this folder automatically and contains all the cache data. And if you have to use the emulator you have to download it again manually.
I updated from Android Studio 2.3 to 3.0 . Now my project is stuck loading symbols for more than 30 mins. Any pointers on how to resolve this?
I tried to reinstall it - the same result.
I tried to relaunch - the same result.
In your project,
Delete {root}/.gradle folder
Delete {root}/app/build folder
Delete {root}/build folder
Run Invalidate Caches / Restart
Sync your project again after Android Studio restarts
SOLUTION FOUND!!!
Android Studio does the most dumb thing: it indexes ALL FILES on your PC.
Straight to the point: I deleted my downloads and DerivedData folder and all went alright.
A short explanation.
. DerivedData became a huge folder with tons of files making Android Studio loop forever on those files
. On my Mac the Downloads folder is shared as hard links with multiple apps. for example, the Skype or Steam apps have hard links to the Download folder, making Android Studio re index the entire Downloads folder multiple times.
What worked for me as a Windows user was to close android studio via Task Manager and navigate to my
C:/ drive -> Users -> My user profile
I then deleted the .android file and re-opened android studio again.
Opened AppData in that same directly which revealed the directories i) Local ii)LocalLow iii)Roaming
Opening Local I deleted the Android Directory in there
Opened the Google Directory i.e. AppData -> Local -> Google and deleted the directory AndroidStudio2021.2
Navigated to AppData -> Roaming and deleted the Google Directory in there.
I then opened Android Studio again.
P.S: I lost all my plugins installed and any other customizations but it worked.
I updated my android studio into 2.3 then upon connecting my app to Firebase, it gave me an error:
Error:Unexpected lock protocol found in lock file. Expected 3, found 0.
Do I need to go back to 2.2.3 or is there any way to fix this? I tried deleting .gradle file in my project but it still gave me an error.
Delete the .gradle folder from user directory, not from the project.
C:\users\username\.gradle in windows
/home/username/.gradle in Linux
/users/username/.gradle in Mac
Before you go deleting your entire general .gradle folder for android studio, please note the following implications and consequences.
It will cost as much as 3 -4 GB to re-download its content
The download could take days if you are not careful and the network is not super fast
For every old project you reopen, chances are some items are missing, therefore, the android studio will have to redownload missing content, god help you if you chose to take out your laptop at a random eatery without free internet and quickly get some work done.
The deletion process involves thousands of file, up to 119k, the operating system finding them will take forever and deletion will take even longer.
Here is a much better solution;
Close android studio completely
Using the file explorer of the operating system, in your app's project folder open the .gradle folder
Note the number(name) of the folder in it, such as (2.3 or 4.4 or 4.6 or 4.8)
Go to your general .gradle folder as described by #Gabriele Mariotti
open it and open the "caches" folder
Delete the folder with the same number as the second step
If you are paranoid like me you could also delete your project's .gradle file too (not necessary)
The file is not larger than 4 MB and it will not be re-downloaded but regenerated by android studio automatically, therefore the whole process should not take you 5 mins, costs no data, and all previous projects function as normal.
For linux users, Press ctrl+H to show hidden files inside home directory because .gradle directory is usually hidden and delete .gradle directory.
After that you might receive an error as "cannot lock build output"
then remove the lock files in the gradle cache by executing something like this:
find ~/.gradle -type f -name "*.lock" -delete
Delete the .gradle folder from the project's root folder.
For example if your project root folder is MyApp.
Close your project in Android studio
Remove your project from project list.
Exit from android studio.
Go to the MyApp Folder.
Find the .gradle folder.
Delete it.
Restart Android Studio.
Import your Project again.
Android Studio will download again all necessary Gradle files automatically (Internet Required).
All Done.