2 votes

What does Android Studio mean by the 'Typo: in word' alert?

Android Studio is throwing me an alert on a variable that I have declared as follows:

private FirebaseAnalytics mFirebaseAnalytics;

The alert, reads as follows:

Spellchecker inspection helps locate typos and misspelling in your code, comments and literals, and fix them in one click.

Yes I understand that it helps me to correct typing errors but.... what write error do I have in that declared variable, is it because it includes the name 'firebase' inside?

1 votes

It means that the word is not in the dictionary. Did you ever use word processors like Microsoft Word, do you remember that they put a kind of wavy red underline under the words with errors? Something similar happens here. That won't cause any errors in your code. You can do several things: add the word to the dictionary, disable Spellchecker (weigh that decision well, don't take it lightly), or ignore the alerts. SpellChecker is an Android framework . I assume that it is used e.g. for documenting code.

0 votes

Sebastian check A.Cedano's answer explains what you ask in your answer, actually it's not a mistake it's just a warning. @SebastianPaduano

4voto

A. Cedano Points 48884

The literal translation of the message:

Spellchecker inspection helps locate typos and misspelling in your code, comments and code, comments and literals, and fix them in one click.

It is as follows:

Spellchecker inspection helps to locate typos and misspellings in your code, comments and typos and misspellings in your code, comments and literals, and to correct and correct them with a single click.

When it appears on a word, there is no need to be alarmed. It means that the word is not in the dictionary.

Did you get to use processors like Microsoft Word, do you remember that they put a kind of wavy red underline under the words with errors? Something similar happens here. Sure, in a word processor that's a big deal, but not in a code editor (at least not in terms of program operation). That won't cause any errors in your code.

You can do several things:

  • add the word to the dictionary,
  • disable SpellChecker
  • or ignore the alerts (they are also not as conspicuous as bad code alerts).

Weigh well the decision you make, especially if you decide on the former or the latter. If you don't plan to use the dictionary, don't add words to it just so Android Studio doesn't bother you with that warning; if you plan to use the dictionary, don't disable SpellChecker...

SpellChecker is an Android framework. I guess it is used to document code, for example. In this link they explain what this framework is and how it works. Maybe reading it in full you can decide what to do in this case.

They introduce it by saying this:

The Android platform offers a spell checker framework that allows you to implement and access spell check in your you to implement and access spellchecking in your application. application. The framework is one of the text services APIs provided by the Android platform. offered by the Android platform.

To use the framework in your application, create a special type of Android service that generates a spell checker session object. service that generates a spell checker session object. Based on the text you provide, the session object returns spelling suggestions generated by the spell checker.

▸ <a href="https://developer.android.com/guide/topics/text/spell-checker-framework" rel="nofollow noreferrer">Spell checker framework </a>in the Android documentation

HolaDevs.com

HolaDevs is an online community of programmers and software lovers.
You can check other people responses or create a new question if you don't find a solution

Powered by:

X