This always worked before but since yesterday the little green arrow (green background, white right pointing triangle) does not work. Nothing happens, except maybe once in twenty tries. I have to push the small black down facing triangle right to it and launch the project from the popup menu.
I also have a keyboard shortcut bound to the same "Run" command. Also this shortcut has the same problem. It only rare works since yesterday. Most of the times there's nothing happening at all. No output in Console.
Try this:
Clean Project -> close all files
Restart Eclipse
Right click on project -> Run As -> Android Application
Try the run button again.
Let us know the outcome.
Not sure whether is this the case or not. When you working on your XML or Manifest and you launch your application it wont really work. It will launch your xml file instead and might create an extra file in your project. Try to launch your application in an activity(Java) page.
Related
I've looked through all tips in the other threads here, tried all proposed solutions (last thing I did was completely uninstall and reinstall Android Studio), and I still get it...
If I select "Build APK", then whenever I change the code the changes aren't put in effect in the new versions of the app... I think I'm going to give this up for the weekend...
First I had all the database errors I pointed to in the other thread (unsolved), then Android Studio started "ignoring" changes in my code (like commented lines being ran as they weren't commented), now invalidating the cache and everything else (including the reinstall) left me here...
Any thoughts?
I sorted it myself (this question was asked multiple times around here, HOWEVER it WAS NOT satisfactorily answered):
Go to "Run" - "Edit Configurations", look at the "Before Launch" field at the bottom of the window, click on the "+" sign and add the "Gradle-aware Make" option to the list, no additional text needed on the next input window (just click on "ok").
Everything was working absolutely perfect with my Android Studio until I decided to change the module name and it simply got stuck. I literally can't do anything about it.
I can't access any of the File/ Edit/ Navigate/ Tools/ Build/ Analyse (/or any other) options.
Everything is unaccessible
I can't shut down Android Studio.(Quit application doesn't even work)
More over I can not shut down my Mac it just displays "Android Studio is interfering"
I have already tried $ adb kill-server but it doesn't work. I didn't find any solution to this problem elsewhere either. So, please help if you've any idea about this.
Fixed:
Go to Activity Monitor,
Search in list for android studio,
Click on close button below the minimise button in top left corner,
Force quit.
This is for MacOS
The below process perfectly working for me.
Go Applications/Utilities/Activity Monitor then open it.
The select android studio then click left corner cross button
after that, you can see popup please press force quit.
Simply press Escape.
It will close the application after saving the projects currently running.
I am working on Ubuntu 14.04, AndroidStudio is 1.2.1.1. I am able to build the app, click on the "Debug" icon and launch the app. I can see logcat output and I can pause the app from the debugger. The one thing I cannot do is set a break point. I tried clearing the cache, restarting AS, right clicking in the file where I want to set the break point. None of these produce the desired effect. This is a well-hidden feature.
I also had this same issue in Android Studio, where I couldn't set breakpoints. This is what I was doing wrong: I was clicking on a line that didn't have any code in it, or a line that contained a comment. As soon as I clicked on a line in method/class, it allowed me to set the breakpoint.
There shouldn't be any problems setting break points if you follow the process outlined here
If you are running into some issues, here are a few steps to get you started:
- Use a Log.d() in your app and see if it outputs to the logs. If it doesn't then you know you are not in debug mode.
- Are you debugging on the device or the emulator? If the device, you need to enable development. I would suggest to select "wait for debugger" to make sure it's attached before you run the code.
This should be pretty straightforward. Let me know what you find out.
To add a line breakpoint, proceed as follows:
Locate the line of code where you want to pause execution, then either click the left gutter along that line of code or place the caret on the line and press Control+F8 (on Mac, Command+F8).
If your app is already running, you don't need to update it to add the breakpoint—just click Attach debugger to Android proccess . Otherwise, start debugging by clicking Debug .
I am updating an Android project, and for some reason the run button in eclipse does nothing. I can get the app to run if I go Run>>Run Configurations... and then start it from that, but if I just click the play button or if I use the hotkey for run (CTRL + F11 ) then nothing happens. It seems to make no difference if an emulator is already going or not.
Anyone have suggestions? I like to code by making small changes and then running the app to see what happened and its very frustrating to have to go through 3 clicks just to get it to run every time.
Thanks
Using default settings in Eclipse, the Run button and hotkey CTRL + F11 will not work when the xml editor is in focus. It should work if you are working with the Java editor. To use the button or hotkey while editing xml, first click on the project in the package explorer.
You can adjust this by going in to Eclipse Preferences and choosing Run/Debug and make it launch your last used Run Configuration. Then only for the first time you launch you will be required to right click your project and choose Run As -> Android Application. After doing this pressing Ctrl+F11 or the Run icon will always start that Run Configuration.
I'm having a troubling problem testing some code for and Android app. My app has two parts, and activity where the user changes some settings, and a broadcast receiver that responds to SMS messages, both in the same package.
Here's the problem, I first implemented some simple code to test out the broadcast receiver and the activity, and both worked fine. But then as I tried to refine the code, I noticed the emulator wasn't picking up any of my changes. Event went so far as to uninstall the app from the emulator and try again, no luck. Then I added some extra Toast popups to my receiver, nothing, still running the old code. I know its running the old code because its sending out an SMS using a string constant that is no longer in the current code, so it should be impossible that it respond with that value.
Here's the kicker that has me confused. For fun I made a change to my activity. Ran the project from Eclipse and that change showed up! Tried to test the receiver code again, runs the old code that doesn't even exist anymore!!
How in the world can half the package update, and the other half not?
Can anyone help me out 'cause I'm about ready to lose my mind.
I had a similar problem. Changes made to classes imported from another project didn't get picked up by eclipse, but those made to classes in the current android project were.
Making a change to the current android project (inserting a blank line and deleting it) seemed to make eclipse pick up all the changes made and upload the app to the emulator.
I had this problem too, Now I found a working solution. Just follow these steps:
Run your project normally.
When emulator started, run your project again (DO NOT close the first emulator)
Then the updated application will be uploaded into emulator
I can't really be sure what happened but creating an new emulator image appeared to solve the issue.
I don't know why it happens but it's a problem I have all the time.
What I typically do is
Close the emulator
Close Eclipse
Reopen Eclipse
Clean the projects (in Eclipse, select Project -> Clean... -> Clean all projects)
Rerun the emulator
Annoying as hell but seems to work for me.
I'm having this problem too. It mostly happens when errors are entered into the code. The strange thing is if I go back to the original code, Eclipse doesn't revert to the original code. One thing that seems to help is to temporary delete the contents of a file, save, and rebuild, and then enter the contents back into the file, save, and rebuild.
How is one supposed to debug in such an environment?