Eclipse issue with ADT plugin - android

Does anyone know how to repair/clean install eclipse?
My version of Eclipse Juno with the ADT plugin has been behaving very strangely, but since Eclipse runs straight away without installing, I don't know how to reconfigure it to its initial state.
I was working on an Android layout when I noticed that lines of xml layout code was disappearing as I typed. The code itself was not being deleted, it just wasn't displaying - sometimes I couldn't even see the code I was typing or it was looking as if it was overwriting something else.
And the final straw just happened now. Somehow, my keyboard got stuck on the Ctrl button via eclipse. So after I quit the program, my Ctrl button was still pressed in. So trying to type "s" in notepad was bringing up the Save dialog and when I opened Word, it asked me if I wanted to start in safe mode since the ctrl key was being pressed. The solution was to restart my laptop (this bug was still present when I plugged a keyboard in before restarting)

Did you try eclipse -clean from command line.
If that doesn't help try reinstalling the ADT plugin by first removing it from Help -> About -> Installation Details and then reinstalling following the instructions at http://developer.android.com/sdk/installing/installing-adt.html

Perhaps Ctrl getting stuck wasn't the final straw, but the whole problem? This sort of thing happens to me fairly frequently (in Windows). Control, Shift, Alt get stuck down causing confusing behaviour. What's actually happening is that for some reason the key-up event is getting lost, so the OS thinks the key is still down. It happens especially often if you're alt-tabbing into a VM, or using a hardware debugger (where the key up happens within the debug session).
The solution, whenever you think this is happening to you, is to just press all the modifier keys one at a time (left shift,right shift, alt, left control, right control etc) so the OS knows the state of them. No need to reboot the PC.

Related

Android Emulator keeps crashing after button Press

My Android emulator crashes whenever I press keys on the pc keyboard or hit the emulator side buttons. the only part that works is the emulator mobile screen. This doesn't happen to just one device but to all emulators I use. This is really annoying cause whenever I press any key on the keyboard while the emulator screen is active it will instantly crash. But keystrokes won't crush it when text input is active on the emulator screen. The operating system I use is ubuntu but Windows fix is also useful.
I need help from someone who has managed to solve this problem before.
I'm pretty sure I got this error before too. Whenever I pressed a button, the emulator would just say "Saving State..." and just closes. The only solution I found to fix this was to delete the emulator and create a new one. It's not the most effective solution, but I couldn't find any other solutions.

Android Studio reformat code shortcut not working

This is my keymap config in Android Studio. I used to use Command+Alt+L to reformat code after I write a bunch of code and it has been a habit of mine. But this shortcut is no longer working, the Show Reformat File Dialog(Alt+Shift+Command+L) works!
This shortcut is so important to me and I don't want to change it to something else, any idea?
PS: I have an external keyboard plugged in to my Mac when I'm at home. Last time this happens was when I'm using the external keyboard, so I unplugged the external keyboard, not fixed, and then I restarted Android Studio, not fixed, then I rebooted the system, worked. This time I rebooted the system, not fixed, invalidated cache and restarted, still not working. I tried to remove the shortcut and add them back, but I'm not able to add shortcut with Alt and Command both pressed, I can add Alt+L and Command+L, but not Alt+Command+L, so I gave up. Then I changed the keymap setting to something else like Eclipse's and change it back to Mac OS X 10.5+, not fixed... The last option I will try now is to uninstall the AS and reinstall it.

Android Emulator on Mac OS X issues clicking

Really weird issue but when I try to click once it doesn't register on the emulator but then I click again and the click registers. This is using AVD. Every other click seems to trigger in the proper place. This has nothing to do with my app just base image.
Take a look at this:
https://www.youtube.com/watch?v=axvxtGj4HPo&feature=youtu.be
and notice the first click doesn't register.
I notice the age on this thread, so not sure if you have already figured this out. I ran into something similar like this today in which no clicks were being registered at all. This issue still persisted even after closing and reopening the simulator. One thing I did notice is that the power button still worked.
I ended up fixing this by:
Clicking and holding the Power Hard Key
Restarting the device OS by clicking the Restart
After the OS Reboots, everything seems to work again.
Note: the Hard Key for power is the power button next to the volume controls on the right.
In my case it usually happens when the size on disk is very high (see in AVD Manager) and the solution in my case is to make a Wipe Data
Update #1 (Because the solution from above not always works)
Another thing I found is that when you want to swipe up from the Google bar does not open the apps menu. Then I open first the Messages app or Chrome and close again. From there the Swipe up works again.

Android Studio interface issue

How can i solve this problem where the interface jumps all over the place?
This happens on Android Studio 1.5.1 (based on IntelliJ), but not on Java IntelliJ IDEA, which is weird.
Update:
It doesn't happen continuously, usually after a few minutes in the program.
A full reinstall and restoring default layout is not solving the problem.
However when resizing the window or when dragging the window outside the visible area of the screen, the layout goes back to normal and mostly when the mouse is moved the same issue appears again.
Update 2:
Since one of my 2 boot SSD's (in RAID0) gave up on life, I was forced to reinstall Windows and so lost all the programs on the C drive... On this new Windows install the interface issue with Android Studio is gone, so the problem was probably a wrong config file or a problem with Java.
I think you can reinstall it.Also you can click shift+F12 first.

IntelliJ IDEA takes too long to show files in the "file/folder selector" dialog

Update (24/01/16):
I'm not sure why, but it doesn't happen anymore, I forgot what I've changed the last time I was using this PC, I remember disabling Google Drive from opening at startup, but not sure that's the reason, the moment I'll figure it out I'll post an update here.
Also, since I found no other people having this problem on the Internet, I guess it's a good idea to post solutions in case someone had this problem and solved it for the next user who'll face this problem.
Problem description:
Whenever I get to the dialog where I open a file or directory (Like "File>Open..." or "import settings") it takes about 50 seconds to show the file tree.
There's nothing shown except "Loading..." and "Nothing to show".
Also, clicking the "X" button or the "Cancel" button does not respond until it finishes with the process of showing the file tree.
The same can be said about dragging a file/folder, it just won't respond until it finishes the slow initialization.
The dialog window itself is responsive all the time, it's not frozen.
Seems like it takes a long time to initialize, and after that it works perfectly (Until the next time I get to this dialog).
Technical details:
I'm using Windows 10 Pro 64bit
The OS and the software are installed on an SSD
The directories I'm browsing are on the same SSD
The project is an Android project
Things I've tried:
Disabling windows indexing
Running the 64bit version of IntelliJ IDEA
Running it as administrator
Invalidating catches and restarting
Turning off the antivirus (NOD32)
Same for me, but I found the culprit in my case.
I have some network drives mapped with drive letters assigned to them, and if those network drives are disconnected but Windows 10 does not notice this and shows them as being connected the "Select path" dialog takes a long time to show the file tree.
So the solution is to set those de facto disconnected network drives to appear "disconnected" in Windows Explorer.
To be more specific, in my case those network drives are mapped in a virtual machine running under VirtualBox; quitting the virtual machine did not make them disconnected for the W10 host.
I know this is not a proper fix, but you can just drag folders onto the IntelliJ desktop icon and it'll open them instantly.
Disable all the plugins that you are not using
Go to Android Studio folder in the bin folder there is a file named studio64.vmoptions open it and make this change: -XX:MaxPermSize=1024m at least (if it is 350m), -Xms128m and -Xmx2048m
I hope this will help you :/

Categories

Resources