I have installed all of the necessary parts and the ADT plugin for Eclipse. When I create an Android virtual device and start it, nothing appears. I get the box where the green status bar shows up and says 'Starting emulator for AVD'. However, nothing appears afterwards. No logs in the Console either....does anyone have any suggestions? thanks.
You will have more chances to debug the issue if you start emulator with “emulator” command:
emulator #avd-name
“avd-name” is your emulator image name as you created it.
And if you don't happen to have “emulator” command, try adding “android-sdk-linux_x86/tools/” (where android-sdk-linux_x86 is your android SDK installation directory) to your PATH.
I had the same issue for a bit and realized it was because when you set the skin it is default set to WVGA800 but for whatever reason it only worked if that was set to HVGA.
I found the problem is the graphic card. The emulator may not recognize you graphic card try again with another one.
For Ubuntu (I use Xubuntu):
Mine Android Virtual Devices didn't started because i used NVIDIA drivers for ubuntu.
After changing drivers to Nouveau it booted in 15sec.
Go to "Settings Manager" -> Software & Updated -> Additional Drivers
chose: "Using X.org x server -- Nouveau display driver (open source)"
NVIDIA F# U
http://www.youtube.com/watch?v=55XVnJ_0qhg
I had a similar issue.
Windows 7.
ADT Bundle 64-bit.
I was logging in to my PC with Active Directory credentials(corporate).
Emulator was not starting at all, after I tried many different things.
I switched to a local administrator login, and everything worked.
This is not necessarily the solution. I would rather want to know how to make it work on my AD account.
This also is related to the screen size of the emulator.
I created a fresh AVD with a 768x1280 display. This starts fine. Then I replaced the values of lcd.height, lcd.width, skin.name, skin.path in the config files to represent 1080x1920. After that the emulator does not start anymore.
I start the emulators inside a Xvnc session with 1360x768 pixels, but it also does not work in a Xvnc session with 3000x2000 pixels.
Related
I've been setting up a 2018 MacBook Pro for Java development. It's running Mojave 10.14.1 - just like the older machine I'm migrating from, an early 2013 MacBook Pro. I installed Java 1.8.0_192 and immediately noticed that I could not launch jars or any Java app that had a UI on this mac. I uninstalled and tried each of these: 1.8.0_172, 1.8.0_191, 1.8.0_192, and 11.0.1. I traced the issue further and found a common error:
Caused by: java.lang.NullPointerException
at java.awt.Window.init(Window.java:497)
at java.awt.Window.<init>(Window.java:537)
at java.awt.Frame.<init>(Frame.java:420)
at java.awt.Frame.<init>(Frame.java:385)
at javax.swing.SwingUtilities$SharedOwnerFrame.<init>(SwingUtilities.java:1763)
at javax.swing.SwingUtilities.getSharedOwnerFrame(SwingUtilities.java:1838)
at javax.swing.JWindow.<init>(JWindow.java:187)
at javax.swing.JWindow.<init>(JWindow.java:139)
Curious, I launched our Swing-based product and it reported the same error. I googled and found only unanswered posts.
(revising this to be formatted as a question and not a blog post)
What gives?
I had the same issue and I found it reported here.
In my case, I was using a docking station for my MacBook Pro and DisplayLink Driver for extended display. This made Jmeter crash.
The workaround was to disconnect my laptop from its docking station and launching the application.
The solution to this problem was simple, but not immediately obvious.
I dug into the JVM and found that the native code wasn't able to identify a compatible graphics mode from the OS. This results in a null GraphicsConfiguration. That's not good - it causes a NullPointerException in Window.java...guess what line. (Line 497)
I suspected the OS wasn't returning the right information about its graphics setup and then started to suspect the graphics driver. That's when I remembered Macs have parameter RAM (PRAM) and non-volatile RAM (NVRAM).
I zapped the PRAM and NVRAM and now the machine is working fine!
To zap the PRAM and NVRAM:
shut down your mac
restart while holding option+command+P+R
keep holding these until the mac appears to reboot again (the apple logo
will appear, disappear, and reappear)
If your mac starts up without the disappearing mac logo, shut it down and retry.
Reset NVRAM or PRAM on your Mac
I hope resetting the PRAM helps others!
We have the same issue when trying to open an inhouse Java-based application in conjunction with Dell D6000 docks using DisplayLink software.
As others have suggested disconnecting the Dock then launching the application works after which you can reconnect the dock and move the application to the other screen.
The other way we have managed to get it to work is with the laptop open making the laptop screen the main display this is done in the system prefs in the display settings and moving the white bar to the laptop screen then opening the application.
I think it has been said before when the main display is one run through DisplayLink it can't detect the display so return a null value, even running most recent drivers (24th Aug 2020) this is still the case.
So its workarounds not solutions if you are in the same boat
Why am I unable to see networked drive on Windows 10 PC with Java Open Dialog. I have noticed a problem when running my Java application from IDE, the Open Dialog does not show my NAS (NetGear ReadyDuo mounted on Z:drive). Yet when I run the application outside of the IDE on the same machine using the same JVM it is okay.
In both cases I'm using Java 1.8.0_72 25.72-b15 64bit on Windows 10 10.0 amd64. I'm sure I didn't used to have this issue but don't know when it started occurring. Its not such a big issue for me if it doesn't show in the IDE because of the IDE, but I'm concerned the IDE may be irrelevant and that potential customers are also seeing this behaviour.
Screenshots below show what I see in the two circumstances
I have encountered this behaviour in other softwares, where the cause was, that the drive was not mapped persistent.
What i did to solve it:
Map your Network Drive with the Windows Explorer GUI and mark "always connect".
or in cmd.exe (please try above 1st!):
net use z: \nas\media /user:usr pass /persistent:yes
Kind regards.
Its not possible for me to comment, so I have to ask here.
Did you tried to run your IDE with Administrator Rights? Maybe some minor 'problems' with UAC (User Account Control).
Solved issue, it seems if you mount a network drive using Windows Explorer, but then run the IDE with administrator privileges then you do not have permission to access the drive because now seen as separate user admin (even though I only have a single user) that wasn't given permission.
The way round is write create batch file to mount the network drive
i.e
net use z: \\nas\media /persistent:yes
and then right click on the batch file and select Run as Administrator
Don't know if there is an easier way.
When i try to launch it any way, Java ME just freezes. To be more specific, javaw.exe called by device-manager.exe seems to go into infinite loop, since not a single exception or error message is passed. Icon in tray appears, but its menu, instead of devices list, shows only one entry: Exit, which incidentally doesn't work. I can only shutdown it through task manager. And since device-manager is required for emulator, i can't work with it at all.
I tried versions 3.0,3.2,3.3 of Java ME SDK and this problem persists in each one. OS: Windows 7. JDK: 7u25.
I've tried each and every advice i found on the Internet and still can't get it working. Device-manager log shows that the problem starts upon calling "rmiRegistryPortFile".
[2013-07-02 19:20:53.070] DEBUG - strap.BasicObjectConfiguration - Calling create on rmiRegistryPortFile
That's always the last entry in the log.
There was only one way i've managed to get it working - by installing and running it under Windows Virtual PC. Curious thing is, under VM it's working fine in the same very OS (freshly installed Windows 7). But unfortunately that didn't really give much on the cause of the bug, and that's not a solution :( I have to somehow get it working without VM.
I tried reinstalling Windows, that didn't help. Looked through javaw I/O in Process Monitor and compared it with working one. It looks like one of the application threads suddenly shuts down after reading file "rt.jar" (when loading "rmiRegistryPortFile" i guess?), whereas working javaw writes to log-file immediately after that. Windows logs got nothing on the subject: no permission issues, no errors or warnings at the time.
Tried modifying PATH variable to the dir with rmiregistry.exe, did not help. Network sockets are available. Changed DEP settings, same.
Could anyone please help? I've spent days on this bug already.
It's definitely a permission problem. Try to look if any folder related to Java is "READ ONLY".
If you get this error message when trying to run midlets through the built-in emulator of the JavaME SDK 3.0, try disabling DEP for runMidlet.exe.
Data Execution Prevention (DEP) configuration can be found at the following place in Windows: Control Panel > System Security > System > Advanced system Settings > Advanced tab > Performance > Data Execution Prevention.
Add this file to the DEP exclusion list:
<javame-install-dir>\runtimes\cldc-hi-javafx\bin\runMidlet.exe
If things work for you now, complain loudly to Sun (now Oracle) that they need to make software without buffer overflows.
Personally I filed a bug-report against the JavaME SDK 3.0. You should do that too, or make your voice heard on the same bug-report that you're having this problem as well.
Freshly installed windows doesn't have msvcrtXX.dlls
Go to folder runtimes\\cdc-hi\\bin and copy Microsoft.VC80.CRT into runtimes\\cldc-hi-javafx\\bin. This problem will be fixed over autoupdate soon.
Problem with localhost
Please edit <javamesdk_installdir>\\toolkit-lib\\modules\\bootstrap\\conf\\system.properties and change
device-manager.object-registry.host=localhost to: device-manager.object-registry.host=127.0.0.1
Port 1299 might be taken
Please edit <javamesdk_installdir>\\toolkit-lib\\modules\\bootstrap\\conf\\system.properties and change
device-manager.object-registry.port=1299 to: device-manager.object-registry.port=1999
XP 64-bit
Please use 32-bit version of JDK.
Firewall
Make sure that firewall is not blocking communication on ports given in 3. Default port numbers are 1299 for windows and 1999 for Mac.
I have tried all those steps above to no avail, until I replaced my JDK jdk-8u117 with jdk-8u112 (Must be 32 bit) after reading this thread https://community.oracle.com/thread/4009110. I had to restart my machine after changing the Java version because it was not detecting right away after installation. I'm using Netbeans 7.4.
I have just installed the latest version of SDK and ADT .when i open the logcat i found that the whole logcat was filled with the following message.still i am not start any project on eclipse!
PgaSocketWriteAllHdipc: hd_ipc_send() failed
hd_ipc_send: not connected
I just 10 minutes the number of this kind of messages reached more than 10,000 and i am fed up with this. Please tell me how can i remove this message from appearing in the logcat.
I was getting this error and discovered that it was a problem with Bluestacks. Bluestacks is an Android emulator for the PC that I had recently installed. Once I quit Bluestacks (which always runs in the background) the problem stopped.
Update:
If you really need bluestacks you can filter this messages by creating logcat filter or just go "System tray (which display in lower-right corner, in windows) then right click on blustack icon and click on "quit" then your problem will solve.
Check this link . Looks like its an official bug related to the emulator system image.
i have also same problem but i knew that it create by blustack , so please go "hidden icons" (which display in lower-right corner) then right click on blustack icon and click on "quit" then your problem will solve , try it...
if any problem then ask me...
Bluestacks needs to be closed(COMPLETELY) for this error to disappear. Just to add to bala's answer, it is important to end all bluestacks processes. For this, see the processes from all the users in the task manager(assuming you're on Windows) & kill each bluestack process.
Uninstall Bluestack. In my case, just stopping the program (quit option) was not enought.
The problem was definitely Bluestacks.. Though I do suggest you to close Eclipse if you're considering to uninstall! The LogCat does not adapt quickly to environment changes and you might get the message even after you uninstall.
I'm using Eclipse and the Android plug-in for my Android phone development. I just worked through my first application from the "Busy Coder's" book and I'm having a persistent problem. Every time I run the example Java application, using a properly configured Android Run configuration that references the example project, the emulator starts (if not already started) and the application is seemingly deployed to the emulator. However, what shows on the emulator is not a reflection of the application's current state. Specifically, the example application I typed up should display the current time and then every time you click on the main app view area it should update the current time (via a Button object instance created in the constructor that has an onClick() handler). Instead, I see "Hello World" and clicking on the main view area does nothing.
It's as if some old copy of the test application is being pulled up. I even hunted down the strings XML file for the project and I did find a string declaration that was defined to "Hello World". I then changed that string to something else, rebuilt the project, and re-launched the application. But I still got the same "Hello World" display and still do not get any response when clicking on the main view area. I even tried shutting down Eclipse and the emulator and nothing changed, and also cleaning the project before a test run.
So, what are the usual mistakes a newbie makes that could cause this situation?
-- roschler
This happens to me occasionally but it is usually fixed by deleting the application from within the emulator UI.
After deleting the application from the emulator and reinstalling it I can launch the application using "Run". After this the application is updated every time the "Run" button is used.
Check the console to see if the activity is actually being installed and launched rather than being brought to the front when you "Run" the app.
If you launch in debug mode, the new build will always be installed in the emulator/device.
However, if you launch in run mode, you need to increase the version number in AndroidManifest.xml, or the new version won't always get installed.
Please see Android: Eclipse doesn't pushed new version of app to emulator from earlier today.
Hope this helps,
Phil Lello
By far the most common reason this happens to me is that I failed to notice that there was an error compiling the application so it didn't push the new version. Especially when my package explorer is obscured so I don't notice the red X.
Edit: one other reason it often happens to me is I have more than one emulator running or my phone or tablet plugged, and I accidently install the latest version to the wrong device without paying attention.
I open the manifest file in Eclipse, "touch" it by deleting and undeleting something, save it. This seems to refresh the APK for me.