So I am learning Google App Engine with Java. When modifying files i realized I dont always see my changes. I try clicking the red button to stop the web application in eclipse and then restarting the application however I dont see the changes. This even happens if i run chrome in incognito mode. I also have the same problem with IE and Firefox (By default i use firefox when developing due to my preference of firebug).
Also at times I will get annoyed with one project and start a new google app engine project. However the GAE will still be running the first one not the second one even though i close the project. Even worse was when i deleted the root project folder I still saw the index.html page though the links were broken for the project i deleted.
I am thinking there are two issues one is that my browser is storing these files in a cache. And the other is that I am not actually restarting the google app engine. Is the right procedure just to click the red square in the console in eclipse or is there something to run on the command line (in windows)?
To be brief , if i want to stop the GAE from in eclipse and restart it to see any changes i made whats the easiest way to do this on windows?
Thanks
edit:
Rumor has it that adding Google Web Toolkit to the project made my App Engine launch show up in the Development Mode pane, where it could be easily be killed or restarted. Is handling this issue this way a wise idea?
Trying out this touch command idea, i was hoping there was a command line way to restart the server similar to ruby on rails
the answer by dragon in this question would be helpful if it had more detail
The red button will stop it. You shouldn't need to run anything from the command line.
What you should do though is look at "Developement Mode" view and confirm nothing is running. It's under Window-->show view -->Other--> Google. Clicking on the gray arrows will show you what is open (running or not). Also, you can press the grey Xs to clear all stopped instances. This should confirm if something is running.
Also, look under run --> run configurations -->server. You have an option to set the port, or have it automatically set. If you are trying to run more than one project, your second one may not start if the first one has already taken the port. Keep that in mind.
As far as your browser storing Dev Mode page in cache, I don't think it can. In fact, if you close the running dev mode in instance your browser page should immediately update reflecting the fact that it has lost a connection. If it doesn't, surely you didn't manage to shut it down.
Ok, so I said the red button will stop it and it will, but you have to get the right red button. If you have more than one instance running, again look at the "Developement Mode" view, there is only one red button and you have to use the grey arrows I mention to get focus on the dev mode instance you want.
It's not really that complicated and you'll have it down by tommorrow!
Here is the Dev. Mode view. You can see I have three instances. The first is actually running, but shows red as there was an error. Clicking the grey grey Xs will get rid of the second two non-running instances and clicking the document icon with one grey x (it's not greyed out), will clear the log from the current running instance and remove the red x as there would then be no errors in the log.
Got it?
Related
I have just started android and I created an app that was running fine a few days ago now I am working on another app but I am not able to run that and now I’m not even able to run the previous one.
now it's just showing Waiting for all the target devices to come online
and then it says Gradle build finished in 830ms or like that!
now it's just showing Waiting for all the target devices to come
online
To solve this-
Go to Device Manager>> Virtual and select launch AVD or from options select cold boot now.
Like Zobaer says, if it says waiting for devices that usually means the build has completed (you can check that in the Build panel) and it's waiting for the emulator to show up. If your emulator is already running, try closing it and running the app again. Otherwise if it's not getting started, try starting it yourself.
I'm just posting an answer to point out that you sometimes do need to be online for Gradle to run, but you can put it in offline mode:
That button in the popout panel, or you can always do Ctrl+Shift+A as usual and start typing what you're looking for!
I have a Java 7 application which is using Java Chromium Embedded Framework to draw html/css into two windows it launches. This works quite well in 4 of 5 PCs that I've run it on. In one case there are alignment issues with the rendered html. Successful runs include Windows 7/8/8.1. Unsuccessful run is 8.1 on an HP TouchSmart Envy, straight out of the box. Perhaps the only distinguishable differences are that this PC is new and that it has a touch screen.
As you can see, the content is shifted upward while being additionally clipped at the right and bottom sides. This is true of both windows that the application opens. What's even stranger is that mouse events (such as the :hover effects on the buttons and click events) are received in their correct position -- clicking about two inches below "Start Presentation" fires the button's click event.
Frankly, I have no idea what to try next on this. I've tried installing and uninstalling graphics-related software, adjusting the screen resolution, adding and removing the second screen, restarting the pc, and updating the onboard graphics driver.
As I have no idea what else could be causing this inconsistency, any advice in troubleshooting this issue would be fantastic.
As it turns out, this appeared to be related to the way JCEF interacts with system drivers. Going through Windows Update for the first time, restarting, and returning to the device's native resolution solved this issue.
We have happily been deploying our cross-platform SWT app with Web Start for years. On the mac we had to switch from using -XStartOnFirst to using the com.apple.concurrent.Dispatch class to get SWT to run in the first thread.
Java 7 update 55 breaks our app again, and again it seems to be Web Start related.
The app starts and displays all windows, but all interface interactions don't have an effect until you click some other widget. For example, if I click a tab to bring it to foreground, I have to then click another widget to finally get the first action to fire. This is probably threading related, like most SWT/Web Start problems but I have no workaround for this problem other than stay away from 7u55. Has anybody experienced this problem and found a workaround?
EDIT: It seems the problem stems from our use of JNA, which we use to get the idle time from the OS using CGSSecondsSinceLastInputEvent. I get a NullPointerException in JNLPClassloader in the logs. If I comment out the code that uses JNA, the problem goes away. Since Oracle seems to be paranoid with security these last months, I'm guessing there is a problem with the jna jar. I sign all jars with the same cert, but maybe there is a new manifest attribute that I should be looking at. Anybody have any ideas?
I am new to java and android and wanted to see how developing for android works
I started by downloading the SDK FROM HERE
However after I finish making the Hello World project sample given in the website HERE, if I try to run it on the emulator as explained HERE, the emulator screen appears, but nothing seems to happen. I can see the word android on the middle of the screen with some animation happening, but that's it. The website says something about unlocking the emulator, but I have no idea what that means. What I have gathered from reading other posts is that the emulator is supposed to have some kind of slider switch as in real smart phones which should be dragged to unlock it, but I can't see it in my case. Now I have no idea why this is happening or what I should check out in order to fix this. Are there any installation logs or something else that I can check to see what the settings are?
What I have tried till now:
I downloaded the SDK ADT bundle from HERE and just unzipped it. Then looked for eclipse.exe and ran it directly. Is there anything else I should have done prior to this?
When I did it for the first time, I had only JRE installed and not JDK, which I realized after reading THIS POST. So I downloaded JDK from HERE, updated the required environment variables and restarted eclipse, but still it's the same thing.
I looked at the Eclipse isn't talking to the emulator section GIVEN HERE, but all it says is to restart eclipse and the emulator, and it doesn't do anything at all.
Rant:
I can understand if the program had failed to compile when I didn't have JDK , or if the IDE gave any indication at all of a faulty program install, but that isn't the case. Everything seems ok, there are no errors, but it just doesn't do anything. This is the type of thing that makes people pull their hair out, and personally, I think the With a single download, the ADT Bundle includes everything you need to begin developing apps: in the android website is very misleading, especially for complete beginners
Anyway, what should I do to make the tutorial program run on my computer? My computer is a bit old and slow so could that be an issue? My computer is Windows XP SP3 on Intel(R) Pentium(4) 4 CPU 3.20 GHz 3.19GHz 2.50GB RAM, but if that was the case I assume the emulator shouldn't even start up
You just have to wait a bit longer. Android loads pretty long on emulator.
Tutorial says about unlocking, because when Android is loaded, your screen on emulator will be locked.
If you find emulator too slow for you, you may want to check this topic out: Why is the Android emulator so slow? How can we speed up the Android emulator?
I had the exact same problem as you when I first got into Android development a week ago. The two things I did are simply
1) Set the usable RAM on your AVD to 768MB
2) When you run your Hello World program in your emulator, give it about 5-10 minutes. Don't touch or click the window at all, just let it load up. Later you can make it persist
3) If your home screen comes up, click and hold the mouse button in the center of the screen, then drag towards the sides and release, this should unlock the device.
Try these steps first, if they don't work then there is likely a problem with your AVD configuration.
If you are launching your app first time with emulator, it will take appropriate time.After that, on Lock icon click and slide to the right. then you can view you application. If not check for your app(icon) installed.
By seeing your configuration of PC I think it will take some time to load emulator. After emulator is load (see below image)
then and then run your code and also check in eclise-device that whether emulator is online or not.
For checking emulator in eclispe :
In second image just above windows logo you can see small rectangular button with plus sign click on that you will get list from which you can select devices. You can find similar button in you eclipse at the bottom.
I had the exact same problem and followed the exact same steps, but was also unsuccessful. I ended up creating a new AVD with a Nexus 4 instead of the latest Nexus 6. The resolution of the 4 is much lower, which I think is what solved my problem. It loaded much more quickly using the 4.
Also, When I was using the 6, I could only see "ndroi" because the size of the screen was much larger than the size of the phone. Now I can see the full device.
vs.
You may just need to relaunch the Android studio 3.6.3.
I got a similar problem. The hello world app does not install on the emulator.
Problem solved after relaunch.
I feel silly asking this and even more silly to have this problem. I have a android project that has been executing fine until now.
but a couple of days ago, without me doing anything particular that I know of, my project has been always launching itself in debug no matter what I try (clicking on the debug or run gives me the same result). I try looking in the project settings and the build configuration but can't see anything justifying this.
so right now each time I launch the app I have to go to go to debug tab and click on disconnect...
Any ideas
Restart the device
I was experiencing the same problem where my app was always being run in debug mode. Restarting the device did the trick for me.
Have you checked your run configurations menu? You might have some extraneous configurations in there that Eclipse is defaulting to when you choose to launch the project.
Failing that, there is an option called "Launch in debug mode whenever the workspace contains breakpoints" in the Run/Debug -> Launching preference page. You might want to check to make sure that this option is not enabled.
As a last resort when facing these kinds of quirks I will sometimes create a new project and copy over my source files (provided the project is not very large). Closing and re-launching Eclipse sometimes works wonders for me as well.
As said above, the problem is with the device not eclipse.
Restarting the device will work, but also killing the application thread/process in the DDMS will do the same job.
On the emulator, go to App Drawer, launch application "Dev Tools". Inside there, pick "Development Settings". Make sure that the field "Debug App" has value "(none)".
Ok, I know I am a bit late with this one but I found a solution. It might be not acceptable for someone, but than again, it solved the problem.
I just reset my phone to factory settings. After that I was able to install the app without getting "waiting debugger to attach" message always.
I ran into the same problem these days, but none of the solutions above worked for me(except for factory reset, don't wanna do that for now).
As Kennifer stated, problem is with the device since this happens only on my Zync Z5 phone (I have several other devices with Android on which app start in Run mode, not Debug mode).
The only trick that worked for me was to delete the launch configuration every time wanted to run app after a debug, but it's annoying to do this every time I need a debug.
I'd tried everything on here and was surprised by the overwhelming acceptance of the top answer
Restart the device
then I realised, "this is a development phone, stop treating it like a business's server", and proceeded to restart.
Worth risking an answer to endorse this solution as a last resort.
My outcome- the app quickly, but quietly died. Result ! :(
My Eclipse version:
Luna.
My case:
The option Launch in debug mode when workspace contains breakpoints is Never, but eclipse launches in debug mode.
My Solution:
Go to Window->Preferences->Run/Debug->Launching.
Mark Prompt in option Launch in debug mode when workspace contains breakpoints.
Launch.
A dialog will popup: There are breakpoints enabled in the workspace. Would you rather launch in debug mode?
Check Remember my decision, then press No button,
and problem resolved.