I'm using the Android Studio (AS) 3.3.2 to try to revive an old project.
Running Analyze > Inspect code...
unexpectedly returns a huge number of spelling errors (~8000) for just about everything, not distinguishing between what is code, comments, or XML attributes, etc.
In previous projects, I never encountered this problem and it seems that AS was smart enough to separate code, variables, etc when spell checking. Now it looks like this:
As you can see, there are also other problems. For example with properties files found in both Gradle cache and seemingly from build intermediates:
..\\app\\build\\intermediates\\res\\merged\\debug\\drawable-ldrtl-xxhdpi-v17_abc_ic_menu_copy_mtrl_am_alpha.png.flat
I have also tried to disable 'Typos'
in the app/build.gradle
under lintOptions{}
without any effect. (It seem that this is ignored.)
How can I tune this to behave in a sane way?
(I don't want to turn off spell checking.)
"URI is not registered" could be for a few reasons such as:
activity_emergency_number.xml
while being in a specific build variant
and it could have been missing some linking configurations for other build variants. A solution here is to try to switch build variants to make Android Studio reload configuration linking.Invalidate and Restart Cache
.folder structure
of where activity_emergency_number.xml is locatedPreferences > Languages & Frameworks > Schemas and DTDs > Add(+) > Apply > Ok
<?xml version="1.0" encoding="utf-8"?>
multiple flavors
, make sure that your current selected build variant matches the flavor for the layout activity_emergency_number.xmlattributes
in activity_emergency_number.xml views are missing some prefix
like android:
or have some prefix that aren't needed fr those attributesAbout ignoring some spelling typo in situations such as code variables and not ignoring them in other situations such as comments, you have those options available to tune together as well with the Scope you are interested (Production, Test, Project Source Files, Project Files..) in:
Android Studio > Preferences > Editor > Inspections > Spelling > Typo
Here you have two things:
Severity
(where you define also the Scope)Options
Process Code
(unselect this to not check typos in code variables)Process Literal
(this one you have to try if you will need it)Process Comments
(keep this selected to check typos in comment)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With