如何在android studio中重置为默认配置

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20582577/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 03:05:13  来源:igfitidea点击:

How to reset to default configuration in android studio

androidandroid-studio

提问by Rob

I totally messed up my Android Studio and I don't know how to revert it back. When ever I create new project this is what I get.

我完全搞砸了我的 Android Studio,我不知道如何恢复它。每当我创建新项目时,这就是我得到的。

enter image description here

在此处输入图片说明

Please point me to the right way on how to make it work again..

请向我指出如何让它再次工作的正确方法..

回答by Joolah

in mac

在 mac

rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
rm -Rf ~/Library/Caches/AndroidStudio*

回答by nifCody

Don't mash up! Simple, but I only know for windows

不要混搭!简单,但我只知道windows

Go to this location in your pc C:\Users[Username]

转到您电脑中的此位置 C:\Users[Username]

In this location you have noticed a direcctory call .AndroidStudio

在这个位置你已经注意到一个目录调用 .AndroidStudio

Delete it.

删除它。

Now your android studio is totally reset.

现在您的 android studio 已完全重置。

To Get the Preview

获取预览

You have to set the path of your sdk.

您必须设置 sdk 的路径。

right click on the project folder (app) --> Open Module Settings --> SDK Location on sidebar --> setup your sdk folder

右键单击项目文件夹(应用程序)--> 打开模块设置--> 侧边栏上的 SDK 位置--> 设置您的 sdk 文件夹

Good Luck

祝你好运

回答by 0wl

Сreate a file: gradle.xml into your .idea project directory. The file should have the following structure:

创建一个文件:gradle.xml 到你的 .idea 项目目录中。该文件应具有以下结构:

<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
  <component name="GradleSettings">
    <option name="linkedExternalProjectsSettings">
      <GradleProjectSettings>
        <option name="distributionType" value="DEFAULT_WRAPPED" />
        <option name="externalProjectPath" value="$PROJECT_DIR$" />
        <option name="gradleHome" value="YOUR_GRADLE_HOME_DIRECTORY" />
        <option name="modules">
          <set>
            <option value="$PROJECT_DIR$" />
            <option value="$PROJECT_DIR$/YOUR_PROJECT_MODULE_DIR" />
          </set>
        </option>
      </GradleProjectSettings>
    </option>
  </component>
</project>

Save project and relaunch Android studio.

保存项目并重新启动 Android Studio。

回答by Meysam Keshvari

File -> Export Settings [find explorer settings.jar] delete file [settings.jar]

文件 -> 导出设置 [查找资源管理器 settings.jar] 删除文件 [settings.jar]

回答by Avinash Kahar

DELETE FILE : .AndroidStudio3.6

删除文件:.AndroidStudio3.6

Windows Go to this location in your pc C:\Users[Username] In this location you have noticed a direcctory call .AndroidStudio

Windows 转到你电脑中的这个位置 C:\Users[Username] 在这个位置你已经注意到一个目录调用 .AndroidStudio

MAC GoTo /System/Library/Caches OR /System/Library/AndroidStudio3.6

MAC GoTo /System/Library/Caches OR /System/Library/AndroidStudio3.6

回答by Isaac Sekamatte

In Android Studio, go to Build, then clean project, worked for me when my project turned in a mess and couldn't build

在Android Studio中,转到Build,然后清理项目,当我的项目变得一团糟并且无法构建时为我工作

回答by shashi

Look for folder .AndroidStudioX.X (X.X is software version) at location C:\Users\UserName. Delete that folder and your Android Studio will reset.

在位置 C:\Users\UserName 查找文件夹 .AndroidStudioX.X(XX 是软件版本)。删除该文件夹,您的 Android Studio 将重置。

回答by Obeda Al Ale

if you want to reset it you must to delete this file C:\Users\YOUR_USER_NAME.AndroidStudio2.2

如果你想重置它,你必须删除这个文件 C:\Users\YOUR_USER_NAME.AndroidStudio2.2

AndroidStudio2.2 decide about your android studio version for me it is 2.2 delete it and it will work that is it :)

AndroidStudio2.2 为我决定你的 android studio 版本是 2.2 删除它,它会工作就是这样:)