Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Reset Android Studio settings to default setting on linux

everyone. I used to develop android application on Mac. Recently I installed android development environment on my Thinkpad which running Xubuntu.

I imported the Android studio settings on Mac to the Android studio on Xubuntu via File-> import settings.

But after I have done this, everything goes wrong. The hotkey, the java path ecc.

I tried to delete android studio, and download it again, but the settings are still there.

On the internet I can find almost nothing about this, does anyone know how to reset Android Studio settings to default setting? Thanks!

like image 268
Shi Avatar asked Jun 14 '15 10:06

Shi


3 Answers

It's very simple. Depending on your AndroidStudio version, the settings are stored in ~/.AndroidStudio, ~/.AndroidStudio1.1 or ~/.AndroidStudio1.2.

Open a terminal and run the following code:

ls -a | grep Android # See which of those three folders above you have. Then rename each of the settings folders you have with the appropriate mv command:

mv .AndroidStudio .AndroidStudio.bak
mv .AndroidStudio1.1 .AndroidStudio1.1.bak
mv .AndroidStudio1.2 .AndroidStudio1.2.bak
like image 59
pat_brat Avatar answered Nov 14 '22 21:11

pat_brat


The file location on Linux has changed since this question was first asked. As of Android Studio 4.2, you may remove all the settings and cache using:

rm -rf ~/.config/Google/AndroidStudio*
rm -rf ~/.local/share/Google/AndroidStudio*
rm -rf ~/.cache/Google/AndroidStudio*
like image 29
nathan Avatar answered Nov 14 '22 21:11

nathan


To restore with same method of the colleague with windows, but now with ubuntu, by the terminal.

  1. To know what folder relating android on the PC, using the command (ls -a | grep Android), without parentisis.

For example, in my case, these: - Android - .AndroidStudio3.0 - AndroidStudioProjects - AndroidV

  1. In my case I got the folder .Android studio, I proceed to delete with the command (rm -rf ~/.AndroidStudio3.0) without parentisis.

  2. I return to check with the command (ls -a | grep Android), without parentisis. if the folder .Androidstudio3.0 was deleted, in my case.

    • Android
    • AndroidStudioProjects
    • AndroidV

then run Android Studio launcher, Vooalaaa !! Configure as the first time and Resetting.

Apologize for my bad orthographies and other details, but with that method I solved my Android Studio in ubuntu 16.04 LTS.

like image 25
andres beggs Avatar answered Nov 14 '22 21:11

andres beggs