Android Studio keeps suggesting me to add App Indexing code.
Worse that it shows quick fix icon always when cursor is in line where there are no other problems.
Quick fixes become less useful because of need to care if it will not "fix" App Indexing problem.
Second - it's annoying and distract from real issues.
How to disable this "brilliant" feature?
Brilliant indeed, took me an hour to undo the changes it caused and to turn it off for good.
File -> Settings -> Plugins -> Firebase App Indexing -> uncheck.
Restart Android Studio and it will be gone.
Note that this will remove the plugin, don't know if there is a way to just disable the quickfix suggestion.
If you need Firebase plugin enabled. Uncheck this function: File->Settings->Editor->Intentions->"Android"\"Insert App Indexing API Code". This disables only annoing quickfix suggestion.
I know this is a bit old, but for anyone who's still struggling with this, you can hide the warning by adding tools:ignore="GoogleAppIndexingWarning" attribute to the application tag.
Related
When I run inspect on my code it shows a warning like this:
Property "isLoading" is never used
Even though I am using that property. There are no problems with code, everything works fine, but this issue annoys me, what should I do?
You can see both warning and usage of that property in the photo below:
If the answer above doesn't work,
Go to your local drive -- Users -- Android Studio -- System
and delete the caches folder, then open android studio.
Go to file -> Invalidate Cache/Restart
Click on Invalidate Cache/Restart, a menu pops up
On the menu, click on Invalidate Cache and Restart
// Wait for android studio to restart.
I made an enormous mistake. I assumed Android Studio knew what it was doing when it said it found unused resources and I let it remove them all. It removed much needed XML id tags, it removed drawables, launcher icons.... what a mess. Has no one in Android studio land addressed this egregious set of errors? I spent a far too much time undoing all the things "Inspect code" said was wrong and I let fix only to find the app fails.
Lesson learned - never assume Android Studio knows what it is doing when it comes to inspections. Always check each before taking their often erroneous suggestion
I installed Android Studio 0.8.14 and was immediately aware to the face that it doesn't show me suggestions, instead it only pops - "Cannot resolve symbol X".
I'm using it on OS X.
I already tried to google it and found the following solutions:
1) Check that the "File->Power Save Mode" isn't selected.
2) In "Preferences" - that the "Android" intentions are selected.
3) Reinstalling it, after deleting all the cookies and local library files.
None of them solved it for me :/
If you put the cursor on the word with the error, a little icon should appear to the left of that line of code. If you click on that you should see the suggestions.
i use mac and had the same problem. i figured out that the android studio does show compile suggestions. What you have to do is click on the word not just move the cursor on it! To accept it, use alte + Enter.
this is my first post on Stackoverflow and i hope it works for u;)
Luckily this question is not relevant anymore since google has released Android Studio 2 on Frbruary 2016. I recommend using that version since it's much more stable and works faster then the 1.x.x versions.
I just started to learning IntelliJ IDEA CE 12 for Android development, as an alternate to Eclipse.
IDEA is very quick and I'm beginning to like it.
However, when I try to edit Android XML file, the code completion never appears. In my office, I'm using MacBook Air (64bit), and when I tried Mac version, it worked beautifully.
In my home, I'm using Vista (32bit ver) and my laptop specs are not so good. (that's why I choose to change to IDEA from Eclipse...)
I have not changed any Settings after the installation. Is there any option(s) to enable code completion for Android XML editor? Or it is just the matter of machine's performance?
I know it's a rubbish question, but I really need help here.
Thank you in advance.
Please check that project is configured properly and your module has Android facet and Android SDK Platform in the dependencies.
IntelliJ IDEA performs indexing of the JSDK, Android Platform and your project when you open it for the first time. You need to wait for the indexing process to complete (progress is displayed in the status bar at the bottom).
Once indexing is complete, you should get all the code completion options available. If for some reason it still doesn't work, try File | Invalidate Caches and restart IDEA.
Faust,
I was having the same problem and here are the solutions I found:
Go to File->Power Save Mode and disable it.
Go to File-Settings/Preferences->Editor->Code Completion and check Autopopup code completion
Go to File->Invalidate Caches and restart.
Disabling Power Save Mode is what fixed it for me!
I followed this tutorial and it worked perfect for me. Now I want to add fix issue functionality. I am using Eclipse.
In Lint Warnings view we have Fix button, can I handle it?
For example when we have hard coded string (android:text="Test") in TextView when you click CTRL + 1, help pop up opens with possibility to Extract String. What I am trying to do is to add extract hard coded dp values functionality.
Also it would be great if you could point me where I could find source code of already implemented lint issues.
Thank You.
Lint checks can be written standalone:
Writing a Lint check: http://tools.android.com/tips/lint/writing-a-lint-check
Lint checks source: https://android.googlesource.com/platform/tools/base/+/master/lint/libs/lint-checks/src/main/java/com/android/tools/lint/checks
Lint fixes are part of the ADT pluggin: http://tools.android.com/tips/lint
Lint is integrated with ADT 16 and later. The integration offers a few features above the command line version of lint:
Automatic fixes for many warnings
Lint gets run automatically on various editing operations
Ability to suppress types of errors as well as specific instances of an error
Ability to configure issue severities
Jump directly to the problem source from the lint view
Consider making a plugin for your Custom lint check in IntelliJ Idea Community edition, downloaded from https://www.jetbrains.com/idea/download/, and follow the tutorial at http://www.jetbrains.org/intellij/sdk/docs/index.html.
After then you will come to know that to handle light bulb for the fix of your custom Lint warning you have to extend the IntentionAction class particularly.
And then search for deploying the plugin in the tutorial and finally you will come to know to put the jar of the plugin thus created in the Android Studio/Contents/plugins folder.
few days ago, when I was debugging an Android project under eclipse I've found some great functionality: "All instances..." and "Instance count". I wanted to share my findings with rest of my colleagues, but none of them had this functionality in their eclipse install (we all use eclipse 3.7).
What's even more weird now I'm also missing this functionality.
As far as I can tell this functionality is build within eclipse from version 3.3 and available to projects using Java 1.6 and above as mentioned here and here (we're using 1.6).
See bottom of this link to see what functionality I'm talking about. It even has it's own shortcut in options (ctrl+shift+n) so I think there must be a way to use it again.
I was looking for it while debugging and while the debugger was in "stopped" state.
Anyone can help me put eclipse in right view/perspective/state to see this functionality again?
EDIT
Here is the documentation entry from eclipse help page: link
Thanks for any suggestions,
kajman
After some more digging I came to following conclusion:
DalvikVM does not support "instance retrieval".
On eclipse help page mentioned in EDIT section it written:
This command is only available if the Java virtual machine you are currently using supports instance retrieval.
Maybe there is an option to enable this option in DalvikVM, but I doubt it unfortunately.
Also when debugging on phone "Drop to frame" functionality is missing.