Right click on Eclipse "Project Explorer" doesn't change focus - android

I'll start by saying that everything was fine until I had some system problems a couple of days ago and my machine froze. A reset corrected that, and then I upgraded my VMWare, which insisted that I bring Eclipse down first. Not sure which of those screwed things up.
I'm in the source panel editing the source for an Android project. I save, then right click the project in the Project Explorer panel expecting to select Run As and pick the run mode. Instead, the Panel Explorer doesn't take focus before popping up the menu, so I get "Run Configurations" only. Also, I can't double click a source file and pop it up without first clicking the Project Explorer panel header first to switch the focus.
Anyone seen this before? I'm guessing there's some setting file that got corrupted. The interruption in workflow is driving me nuts. Help!

Related

Error running 'app: No target device found. Android Studio 3.6 Preview

Aa beginner, failed to run my first Android Application on Android Studio 3.6. How can I make the right setting to see the preview device in the emulator?
I tried the same question and discussion, but failed to solve my problem.
Here's the problem: You don't have any virtual devices. Here's a screenshot of what you probably should have to run (In AS 3.6 Preview):
Compare this to your picture where it says "No devices". So, I'm going to walk you through creating an AVD.
Now, since I do have AVDs, I'm just going to create one. click on that drop-down menu that for you says "No devices" and click "Open AVD Manager":
In the popup click "Create Virtual Device..."
In the Virtual Device configuration popup select the device you want and click "Next".
Choose the system image you want (you can go to the other tabs to see what's there) and click "Next"
Then name your AVD and click "Finish"
Now you should see your new Android Virtual Device:
Closing out of it, you can now run your application with the green "Run" arrow!
I hope this helped!
First try this-
Go to the bottom left of Android Studio then click on the square (the one which show/hide the tool on the left, bottom and right) then on Designer. A new tab should be on the right part of android studio, with gradle and maven project.
If still doesn't work, try this -
If you double click on your .xml file tab at the top it will maximize the designer window. Then on the left you can drag the window to shrink and it will reveal the palette. Then just click on the tab on the left to open the project window.
After connecting the device , go to Files -> Invalidate Caches/Restart -> Invalidate and Restart

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 Studio 2.1.1 running old .apk file

Start of with, I tried all the suggestions in SO and none helped me.
Suggestion1,Suggestion2,Suggestion3.
I'm doing some debugging (Just running the app on my device through Android Studio) and I noticed that time after time, changes that I made in the app does not applied to the .apk AS is running.
The only solution I know is to delete the app from my device and then running again and it compiles with the changes I made in the code. Alternatively, I restart Android Studio and it fixes that too.
I try all suggestions on the site including: file -> invalidate Chaches / Restart -> invalidate, and changing my Run -> Edit Configuration settings but turned out unsuccesfully.I also read all the documentation here but It just repeats the answers here.
My Run -> Edit Configuration
So what's up with Android Studio not applying my code changes?
EDIT:
So for now still no fix suggestion is working. Even my File -> Invalidate Caches / Restart -> Invalidate and Restart not working either.
There is a bug with the new Instant Run feature, the app is not reloaded correctly.
You can disable Instant Run in File > Settings > Build, Execution, Deployment > Instant Run and uncheck the first checkbox. Now when you click the Run button, the app will be refreshed correctly.
How do you deploy the changes in your app to the device? I used to do it by pressing the green triangle (the "play" button) which is the first on the right from the name of the app in the top toolbar. In the new AS version, when you make changes to your app, that button gets a small thunderbolt icon next to the green triangle, like here:
This new icon means that AS will try to do an "Instant Run", ie. to make a hot swap or a warm swap to your app as it is running. Sadly, this hasn't been working as advertised for me (I have been using the new AS for a week now). Instead, I go for the "ReRun selected configuration" button, the fifth on the right, with the gray square and the curved arrow in order to send the changed .apk to the device.

Debugging in Eclipse/Emulator not hitting breakpoints

I have configured a VD through Eclipse and it starts up fine. If I press F11 from one of my .java files in my application project, it starts up a new instance of the emulator and installs the app on it. However it does not open the app and if I manually open it and click on action buttons, it plainly is not linked up to the IDE for debugging as no break points get hit.
Other times when the emulator is open, F11 does the job of re-installing the app (after I manually uninstall it from the emulator), but again it does not attach as a debugger, just installs the app so I can run it.
Is there something basic I am doing wrong so that step-through debugging is not working?
Eclipse having option Skip All Breakpoints,
it might be possible you enable this option so you need to disable Skip All Breakpoints,
Option will appear when you will right click on project and trying to run it.
You can also do it by UI of eclipse , figure out this images. there are a option, if you toggle this button option it will behave disabe/ enable

Dalvik debugging expressed via live machine:

DDMS in the Android Eclipse plug-in used to have a Run menu that looked exactly like the Java window Run menu, with a "Run Configurations..." that took the user to the exact same launch tabs used to start an app under development.
I liked using it through the DDMS because--once an under dev. app was originally installed on a handset--I could rewite that application and test it immediately on the same live handset simply by launching the app through the DDMS. When the run was finished, that APK had in the process been updated directly on the handset--without me ever having to first remove the app from the hardware and reinstall the new version.
Something seems to have changed in the newest Android plug-in from last September (or later). The DDMS-side Run menu no longer looks like the Java-side Run menu. Instead the DDMS Run now has something called "External Tools," with a "Run As" and and "External Tools Configurations..." inside of it, neither of which allows me anymore to select my hardware Device in the upper left pane of the DDMS and Run it directly through there using the stuff I'd just written in the Java window.
Is there no way to do that now?
This bugged me for a long time too. It seems that if you have a java file open in your Java perspective and then switch to DDMS perspective than that run menu will be available. If you have e.g. an XML file open before switching to DDMS then the menu isn't there.

Categories

Resources