Android Studio代码样式方案会在每次启动时自动重置为默认设置 [英] Android Studio code style scheme auto reset to the default every start

查看:93
本文介绍了Android Studio代码样式方案会在每次启动时自动重置为默认设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

将Android Studio更新到3.2.x之后,每次创建项目时,其代码样式方案(在首选项"->编辑器"->代码样式"中)将自动设为默认的项目",而不是我在IDE中设置的方案前.

After I update Android Studio to 3.2.x, every time I create a project, its Code Style Scheme (in Preference -> Editor -> Code Style) auto be default "Project", not what I set scheme stored in IDE before.

将项目代码样式方案格式设置为IDE中存储的方案并应用"后,每次我启动Android Studio来打开此项目时,其代码样式方案都将自动再次默认为项目"!

After I set the project code style scheme format to scheme which stored in IDE and "apply", every time I start Android Studio to open this project, then its code style scheme auto be default "Project" again!

出什么问题了?我该怎么办?

What is the problem? What can I do?

推荐答案

经过大量工作,我解决了以下问题:

After a lot of work, I solved this problem as below:

在项目根目录中打开 gradle.properties 文件,我找到代码 kotlin.code.style = official ,只需删除此行代码,即可解决问题.

Open gradle.properties file in project root directory, I find code kotlin.code.style=official, simply delete this line code, then the problem is solved.

也许此代码使Android Studio感到困惑,或者此行代码设置的代码样式与IDE中设置的代码样式方案冲突.如果我认为是对的,那么这是Android Studio的错误.

Maybe Android Studio is confused by this code, or code style set by this line code have conflict with the Code Style Scheme set in IDE. If what i guess is right, then this is a bug of Android Studio.

这篇关于Android Studio代码样式方案会在每次启动时自动重置为默认设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆