Android studio code completion no longer working - android

I am on the latest version of Arch Linux. I recently encountered a bug in Android Studio where my code completion doesnt work. Originally the issue started with the code completion menu just showing up at the top of the screen instead of below my cursor, but now it doesnt show at all whatsoever. Here are some things I have tried to fix it:
Reinstalled Android Studio.
Invalidated my cache and restarted.
Manually deleted my cache.
Disabled and re-enabled code completion in the settings menu.
Nothing has worked so far. Do you guys have any suggestions on how I can fix this bug?

Have you tried disabling Power Save mode, if its enabled? Its in File -> Power Save Mode.

Try disabling 3rd party plugins that you might have installed.
I experienced similar behavior once I updated my AndroidStudio but after disabling checkstyle plugin, the code-completion started to work again.

Related

White screen after saving changes with NativeScript Angular HMR on Android emulator

I created a NativeScript 7.1 project with Angular 11 using tns create my-blank-ng --template #nativescript/template-blank-ng and then run it using tns run.
The app at first runs perfectly, but it only shows a white screen after saving changes which triggers hot reload.
Is there any way to make HMR work? Disabling HMR could be a workaround, but it's to annoying to have the app restart on each change.
I can't comment, but it seems like although they announced that it now works, with Angular it still does not.
I don't think there's any workarounds at this time. We'll have to wait...
Update: There's also an issue on this at: https://github.com/NativeScript/nativescript-angular/issues/2243
Update 2: Fixed, see accepted answer.
It's a bug - fixed in nativescript-angular#11.0.1
Release note:
https://github.com/NativeScript/nativescript-angular/releases/tag/11.0.1

Android Studio Inspections doesn't work correctly

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

Xamarin Android deployment not using the latest code?

I'm creating an Android app in Visual Studio. When I create the aligned APK to side load on my device (from the Tools -> Android -> Publish Android App), it installs and runs, but doesn't seem to have the very latest changes. The series of events I've experienced is as follows:
Installed a version of the app on my device
Updated a color on the login page and set the application theme (among other things)
Re-installed the app
Saw the new theme but not the new color on the login page
Made a random text change on the login page as a test
Re-installed the app
Saw the color change but not the random text change?!
Any suggestions on what I might be doing wrong?
I have experienced similar issues, my go to for fixing this issue has been the following
Clean all projects.
Build all projects (especially the project containing the xcml files).
Delete (remove application) from the device.
If for some reason this doesn't solve the problem, typically a full restart of Xamarin Studio or Visual Studio does.
I have a similar weird problem where old code from only a single project doesn't get updated. All other projects do get updated/deployed. It only happens on a single emulator, only in Debug mode, and only for that one project.
Cleaning+rebuilding the entire solution did not work. However, telling VS to rebuild the individual project does.
Why doesn't rebuilding the solution rebuild the project? I have no freakin' clue, but I can consistently reproduce this issue and workaround.
In my case, I had a similar problem with connected device, and no one proposed solution like Clean\Rebuild\Restart\Reinstall\etc could help me.
At the same time on the AVD everything worked perfectly, latest code deployed ok.
I found that asked issue depended on selected settings in the [USB Developer] section on the connected device (mine was Xiaomi smartphone). Because some vendors provide us with too many security settings...
What I found, you have to turn on both USB Debugging & USB debugging (Security settings), and turn off MIUI Optimization (it's true for Xiaomi vendor, but you can check your device for similar options). Hope this helps.

Intellij IDEA CE 12 Android XML Code Completion not working

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!

Eclipse hangs while changing properties [duplicate]

Like the question says, no mater what project i try this on, old or brand new, when I right click on the project and go to properties, then select the Android tab (I want to add a library), Eclipse freezes. I have to kill it. Has anyone run into this problem or know how I might fix it?
Thanks
EDIT:
Eclipse SDK
Version: 3.6.2
Build id: M20110210-1200
EDIT:
Or is there another way to add a library. I want to try out ActionbarSherlock :)
Ok, so I don't claim to understand it, but I've tried it more than once and confirmed it. When I'd go to the Android tab in Properties, the window automatically stretches the full height of my monitor and freezes. So, I killed it and went back in, but this time, starting on a different category ("Resource" in this case), I squashed the window height down to almost as small as it could get and clicked on Android. It worked. Didn't freeze. Then I was able to expand the window to see the list of libraries. No idea what it is, but I did it several times...recreating the freeze and then the fix. Hopefully this will save someone else...
i have found the reason ,because the list of available Android sdk is too long ,the window of the property can't be drawn immediately ,so it has no response.
the solution is open the SDK Manager ,delete the old sdk platform ,such as 1.5 1.6 3.0 3.1 3.2
those are not used usualy.then restart the eclipse .it works now .
For these kind of problems you have to try the following (in the same order) and stop when it works.
Play around inside eclipse by closing and opening project, deleting and reimporting projects etc.,
Restart eclipse
Restart system
Upgrade to the latest android SDK
Upgrade to the latest eclipse version
Usually you should stop at 2. Sometimes you need to stop at 3. Occasionally at 4 and Rarely at 5.
Good luck.

Categories

Resources