I recently disabled the XML attribute inspector that would prompt messages such as the below in the XML in real time before running the app. Now since I disabled it I am only able to see the errors when I run my app.
How can i turn on the instant "Attribute inspector" back on?
It would be displayed as a red light bulb to the left of the XML such as:
Android Studio -> Preferences -> Editor -> Inspections
Press on "reset" at the upper right corner, or if it is not there, then search for "xml" and check the appropriate fields according to your needs.
File>Setting>Editor>Code style>Inspection>
Try checking/unchecking some Android>Lint>...
Related
please help me remove this annoying squares ! I can't find this option anywhere :(!
Program: android studio
To remove the coloured squares (Also known as inspections) you either need to solve the reason Android Studio has alerted you to that piece of code with a warning/error; or disable the inspections.
To disable one off/singular inspections:
Go to the part of the code which shows the warning/error
Press alt + enter on keyboard
Click "disable inspection"
That specific inspection should disappear
To disable all inspections:
Go to settings, then editor, then inspections
You should see a list of all inspections, here you can edit what ones you want, and how they behave
To turn off an inspection, un-check its tick-box to the right side of the list
To turn off all inspections, just un-check all tick-boxes
IntelliJ IDEA has an inspection that checks for spelling. In the analysis overview, I can see how many spelling mistakes were found, e.g. 12 typos found. In the code they are highlighted using a wavy green line.
However, I find it very hard to look manually for those wavy lines. Is there a keyboard shortcut or a search function which will automatically skip to the next highlighted typo?
F2 and Shift + F2 shortcuts will navigate you to the Next / Previous highlighted error. You need to configure the error navigation first to Go to next problem instead of default Go to high priority problems option(from the context menu of editor right side bar):
See help for details. Another option is to use double click (F4 shortcut) from the Inspection Results window to go to the source.
IntelliJ IDEA 2016.3
If you want to fix all typos from the project, you can list all of them and iterate through them using double click (or F4 to open the source):
Analyze > Run Inspection by Name...
Type "Typo"
You will be able to see a list containing all typos grouped by file:
In Settings -> Editor -> Colors & Fonts -> General, you can add an 'Error stripe mark' color to Typo.
With the default settings of IntelliJ I find it difficult to spot the typos. So I do the following hack to spot and correct them once in a while.
Temporarily change inspection setting to show Typos as Errors.
IntelliJ then highlights the typos as Errors, making it much easier to spot them in the editor. I correct them and then revert the inspection setting changes. The changes can be kept permanently but I don't prefer that!
I'm using butterknife library to my project to use Bind annotation instead of findViewById.
when I use #Bind(R.id.button) Button mButton;
but never use it, android studio show me warning that I never used it and highlight it with yellow.
when I press Alt+Enter for quick fix -just exploring- and choose the secound choise
suppress for feilds annotated by 'butterkife.Bind'
the warning is gone, but then when I tried to undo what I have done it does't work what ever I tried.
I know it's small thing but it's really annoing.
Open up your Android Studio preferences, and go to Editor > Inspections.
If you want to simply reset everything to the defaults, you can stop here and click "Reset to defaults" under the settings icon to the right of the search box.
If you want to just reset the one inspection, from this list find the inspection that you want to configure. The inspections you have changed should be highlighted in blue. It sounds like you are looking for the "Unused declaration" inspection.
Depending on the inspection, you may see either a "Configure annotations..." button at the bottom of the pane to the right, or a pane that says "Additional special annotations." If you see the button, click it. From the list of annotations, click the minus sign below the pane to remove the exception for that annotation.
If you prefer editing the raw settings files, you can also find your custom inspection rules at <project>/.idea/inspectionProfiles/Project_Default.xml.
I don't know what happened
but when i copy paste a code or write something
No Errors were shown
See the picture below in which i copied a code but no imports yet
But Android studio doesn't show any error.
Even when i Ctr + Alt + O It doesn't imports anything
Is their any setting to get it back or anything else?
I already tried updating all available updates
Sounds like you may be in power save mode. Check it on the File menu, just above Exit. While in power save, code inspection is disabled.
To get code inspection running again, you can either: 1) exit power saver mode, or 2) run inspection manually with Inspect Code... on the Analyze menu.
On the right side, click on the smiling face and pull the progress bar at the right:
I fix this problem by reset setting: File > Manage IDE Settings > Restore Default Settings.
After reinstall plugins, I realized that butter knife plugin was the problem
Clean your Project and press ALT + ENTER for import into android studio
in logcat view
try to remove any filter or filter by your application
Click on bottom right corner icon in android studio and uncheck the Power Save Mode
On the right bottom side, click on the user face and uncheck the power Save Mode.
For me none of the ones above helped.
I found the solution by doing this.
Analyze --> Inspect Code... --> Check - "Whole Project"
Also if this doesnt work out. Check if one of your classes need to implement some methods and the compiler is not recognizing that.
Try also:
Code --> Implement Methods...
go to this path => C:\Users\AppData\Local\Google\AndroidStudio4.1\plugins
find => Groovy_Console_Plugin_8542.zip
check it is extracted if not then => extract hear
then you will get result
note: check your Highlighting level (inspection level) is on syntax
Just remove the ./gradle folder and then relaunch Android Studio to download/install the Gradle automatically.
Invalidate caches and restart helped me
What fixed mine in Android Studio V. 2022.1.1 Canary 3 was that I had "none" selected for the highlighting which showed up as "OFF" in the top-right corner of the code box:
Clicking on that popup box that was now there:
And I noticed it said "Highlight None". clicking on that blue link gave me 3 options:
Selecting the "All Problems" brought me to this stats popup box:
Once that was done doing its thing I was finally presented with errors in my code! (which really isn't good but its good in this step-by-step guide):
On your right side , theres are colored squares next to the page scroll. Typee on the red square to see the error.
Following worked for me:
While opening a new project, be sure you connect your system with power,
restart and then enable safe mode and when the settings pop up
set the check for compile if not checked.
Good Luck
I'm following a few tutorials in order to change my Logcat colors in Android Studio 0.6.1 without success.
To set it up I go to:
File -> Settings -> Editor -> Colours and Fonts -> Android Logcat
Once on Android Logcat, the foreground, background, etc. check boxes are all disabled.
Does anyone have an idea why?
Thanks in advance.
You cannot change the default so first you need to creat your own configuration by clicking on "save as" button.
After doing so there is a check-box below the all available color options, Entitled "Inherit Attributes From Console", Untick that checkbox will enable all color options for you.
To change the Logcat colors you can go to goto File > Settings or press Ctrl+Alt+S.
You can see this similar UI assuming you are using Darcula Theme
Note you need to unchecked Use inherited attributes in-order to modify the color.