CodeStyleSettings.xml always changed by Android Studio

Using Android Studio 1.3.2, the .idea / codeStyleSettings.xml file is constantly being changed to add a section for <Objective-C-extensions>...</Objective-C-extensions\> . These changes, despite the lack of Objective-C code that exists within the project. After many attempts, I was not able to undo these changes - they keep coming back every time Android Studio opens.

Where do these changes come from and how can I avoid Android Studio by constantly restoring the changes?

 <Objective-C-extensions> <option name="GENERATE_INSTANCE_VARIABLES_FOR_PROPERTIES" value="ASK" /> <option name="RELEASE_STYLE" value="IVAR" /> <option name="TYPE_QUALIFIERS_PLACEMENT" value="BEFORE" /> <file> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Import" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Macro" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Typedef" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Enum" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Constant" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Global" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Struct" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="FunctionPredecl" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Function" /> </file> <class> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Property" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="Synthesize" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InitMethod" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="StaticMethod" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="InstanceMethod" /> <option name="com.jetbrains.cidr.lang.util.OCDeclarationKind" value="DeallocMethod" /> </class> <extensions> <pair source="cpp" header="h" /> <pair source="c" header="h" /> </extensions> </Objective-C-extensions> 
+5
source share
2 answers

The <Objective-C-extensions> section has been added by the Android NDK support plugin. It was added in 1.3 and activated by default.

If you activated this plugin, it adds a section to your Stylesettings.xml code. Otherwise, it will be deleted.

+5
source

Ran into this exact problem, which complicates the process, because codeStyleSettings.xml is a versioned file. Decided (on my Windows machine, if that matters) with a low-tech solution for marking a read-only file. Android Studio complained about this for the first time after making these changes, but I prevented it from disabling the read-only mode, and after that everything became normal.

0
source

Source: https://habr.com/ru/post/1232512/


All Articles