Fixed
Status Update
Comments
al...@gmail.com <al...@gmail.com> #2
The same happens when trying to install eap versions of the plugin (e.g. 1.1.3-eap-85-Studio3.0-1).
al...@gmail.com <al...@gmail.com> #3
Yes, we had to temporarily disable updates. This will be fixed in Canary 5.
al...@gmail.com <al...@gmail.com> #4
Ah, that explains. Thanks!
al...@gmail.com <al...@gmail.com> #5
rasgdfzsxgdzfxc
[Deleted User] <[Deleted User]> #6
#1
uc...@google.com <uc...@google.com>
rp...@google.com <rp...@google.com>
mu...@gmail.com <mu...@gmail.com> #7
I am changing my code style to custom one but when i sync the project it's return back to default every time.
ay...@gmail.com <ay...@gmail.com> #8
I'm experiencing the same issue. Whenever I change my code style to default, it changes back to custom whenever I re-sync my project.
vs...@google.com <vs...@google.com>
sx...@google.com <sx...@google.com> #9
Assigning to myself for preliminary investigation.
sx...@google.com <sx...@google.com> #10
Easy repro steps using just one project:
1. Open project
2. File -> Settings -> Editor -> Code Style -> Kotlin -> 9 / 9 / 9 -> Apply
3. Scheme: Gear -> Copy to Project -> Apply
4. Close project
5. "Open an existing Android Studio Project"
6. Select same project, from the filesystem
7. File -> Settings -> Editor -> Code Style -> Kotlin
8. Select Scheme: Project
9. Observed: the project settings are back to the defaults.
1. Open project
2. File -> Settings -> Editor -> Code Style -> Kotlin -> 9 / 9 / 9 -> Apply
3. Scheme: Gear -> Copy to Project -> Apply
4. Close project
5. "Open an existing Android Studio Project"
6. Select same project, from the filesystem
7. File -> Settings -> Editor -> Code Style -> Kotlin
8. Select Scheme: Project
9. Observed: the project settings are back to the defaults.
sx...@google.com <sx...@google.com> #11
Note: I reproduced this using the latest Android Studio built from source. Definitely still a problem.
sx...@google.com <sx...@google.com> #12
When invoking the action from "recent projects" (the one that preserves settings), it invokes RecentProjectsManagerBase.doOpenProject via ReopenProjectAction.
When invoking the "open" action (the one that discards settings), it invokes GradleProjectImporter.importProject(file) via AndroidOpenFileAction.
It seems as though both actions should follow the same code path, and the behavior should depend on the content of the folder rather than which action was invoked. Note that there are also cases where RecentProjectsManagerBase.doOpenProject fails and GradleProjectImporter.importProject(file) succeeds.
https://youtrack.jetbrains.com/issue/IDEA-144453
https://youtrack.jetbrains.com/issue/CPP-12106
Possible fixes:
1. Check for the presence of an .idea folder in AndroidOpenFileAction and invoke the logic from RecentProjectsManagerBase if found.
2. Combine the logic used in AndroidOpenFileAction and ReopenProjectAction.
#1 seems like it might be easier.
#2 seems like it would result in code cleanup, and should also fix the above youtrack bugs.
I'm going to experiment with #1 first to see if it's actually that much easier.
When invoking the "open" action (the one that discards settings), it invokes GradleProjectImporter.importProject(file) via AndroidOpenFileAction.
It seems as though both actions should follow the same code path, and the behavior should depend on the content of the folder rather than which action was invoked. Note that there are also cases where RecentProjectsManagerBase.doOpenProject fails and GradleProjectImporter.importProject(file) succeeds.
Possible fixes:
1. Check for the presence of an .idea folder in AndroidOpenFileAction and invoke the logic from RecentProjectsManagerBase if found.
2. Combine the logic used in AndroidOpenFileAction and ReopenProjectAction.
#1 seems like it might be easier.
#2 seems like it would result in code cleanup, and should also fix the above youtrack bugs.
I'm going to experiment with #1 first to see if it's actually that much easier.
sx...@google.com <sx...@google.com> #13
I'm testing a fix now. It seems to address this issue, but we need to ensure it doesn't cause a regression in bug 37013322 .
sx...@google.com <sx...@google.com> #14
Verified that the patch doesn't cause a regression in bug 37013322 by re-testing the scenario described there against this patch.
We're good to go. Waiting on code review.
We're good to go. Waiting on code review.
sx...@google.com <sx...@google.com> #15
Patch merged. I understand there's also an ongoing effort to take the more general and superior approach of merging the two actions (which I described as approach #2). This patch can be discarded whenever that is ready.
ta...@gmail.com <ta...@gmail.com> #16
Which AS version have the fix?
so...@google.com <so...@google.com> #17
ta...@gmail.com <ta...@gmail.com> #18
Can you give us more information on the remaining cases? The issue link is not public. Thanks.
mm...@google.com <mm...@google.com> #19
This fix should be available in Android Studio 3.5 Canary 4 and all subsequent releases.
ta...@gmail.com <ta...@gmail.com> #20
Hi, I remember verifying this fix within AS canary versions. But now with the stable version, it still has the exact same bug. Is it possible to reopen this issue?
ca...@gmail.com <ca...@gmail.com> #21
Still a problem in android studio 3.6. XML files are not being formatted with tabs correctly. I reset styles from IDE settings, it works. Restart AS, it doesn't work again.
br...@gmail.com <br...@gmail.com> #22
Am experiencing this on Android Studio 4.1.1, Build #AI-201.8743.12.41.6953283, built on November 4, 2020
Description
===========
1. Preferences/Editor/CodeStyle/Kotlin/TabsAndIndents set 2/2/4, Apply.
2. Scheme: dropdown Gear menu select "Copy to Project", Apply, OK.
3. In the code, apply the new formatting and see it's working as expected. Good.
4. Close the project. Close the Studio.
5. Check the .idea/codeStyles folder of the project. It's containing Project.xml with our 2/2/4 settings and the codeStyleConfig.xml referencing it.
So far so good.
The bug:
=======
6. Open some other project and change the studio default CodeStyle loading some other code style file.
7. Close it (like you've been working on a different project).
7. Open the studio again. Open that project again.
8. Open Preferences again. You will see that instead of the Project you have Default Scheme again (even though the codeStyles.xml was pointing to the Project at the step 2 and 5). Switching it to the Project shows the same default settings.
9. Check the .idea/codeStyles folder again. The codeStyleConfig.xml is gone, the Project.xml is reverted to some generic/default settings.
All the settings saved in step 1 are lost. That's an obvious bug.
Same behavior if you try to open a freshly cloned project containing that .idea/codeStyles folder populated.
Build: 3.1.1, AI-173.4697961, 201804040039,
AI-173.4697961, JRE 1.8.0_152-release-1024-b01x64 JetBrains s.r.o, OS Mac OS X(x86_64) v10.13.4 unknown, screens 1680x1050, 2560x1440; Retina
Android Gradle Plugin: 3.1.1
Gradle: 4.4
NDK: from local.properties: 16.1.4479499; latest from SDK: 16.1.4479499;
LLDB: pinned revision 3.1 not found; latest from SDK: LLDB 3.0 (revision: 3.0.4213617);
CMake: from local.properties: (not specified); latest from SDK: 3.6.0-rc2; from PATH: (not found);
IMPORTANT: Please read