I wish to run an application on android virtual device (I've created it). I right-click on the
Android project (which was created after I added the android environment) and choose "Run as Android Application". The emulator launches but it remains just a black window (and I wait a lot, nothing happens). Console writes "Build successful" and that's it. What might be the problem? API level is 18 (4.3). Platform Windows 7. Thanks.
Details: created a project, added hybrid application, added adaptors, deployed and run multiple times (just in browser), installed android in eclipse, added android environment, added AVD (had some old ones that didn't work, deleted them and created a new one following advises here).
It sounds like the problem is with your Android emulator.
First, can you start the emulator by itself, and see it work properly? You can start it from AVD itself. The emulator usually takes a long time to start, especially if you are running the ARM emulator instead of the x86 one.
If that works, can you run an empty Android app? You can go to File - New Project - Android Application Project, and after you create it, you should be able to run it and see an empty application.
If that works, can you try with an empty Worklight application? That way we can see if it is your specific application or something to do with Worklight.
Related
I'm new to Android/Kotlin programming (not to programming in general) and I'm following the Kotlin Basics course on developer.android.com.
The very first lesson after having installed Android Studio is to create a Virtual Device and run an extremely basic app on it.
However I can't get the emulator to work. The very first time I tried, it opened a small window with a progress bar but it became unresponsive at around 1/4 progress and I had to eventually kill it.
Since then it just won't start/open.
After I click run, the code compiles and the Event Log within Android Studio says Executing tasks[...] then Gradle build finished[...] and that's it. Nothing happens beyond that and the Emulator window says "No emulators are currently running".
However:
Some emulator-related processes have been started. Those processes stay alive even after closing Android Studio..
If I try to start the AVD from within the device manager, I get an error message that the device is already running
I am unable to delete these .lock files without killing the aforementioned processes
What I could find:
The Windows Event Viewer shows an Application Error
The Android Studio log file also shows an Error
I don't know what to do with either of these messages, though
What I tried
Killing the emulator processes, removing the *.lock files and trying again.
Creating a different AVD (different device, different version of Android)
Completely reinstalling Android Studio and the SDK following the accepted answer to this question: How to completely uninstall Android Studio from windows(v10)?.
None of this had any effect.
I'm running Android Studio Arctic Fox (2020.3.1 Patch 4) on Windows 10 Pro (10.0.19042 Build 19042).
I am able to run the app on my actual phone but down the line I would like to be able to test apps on different types of devices or without having to always use my physical one.
All help would be greatly appreciated.
By running and emulator.exe command in a command prompt, I was able to see yet another error message, the same one as in this post: emulator: incompatible HAX module version 3 requirs minimum version 4, and the answer to that post from user Harold Sota (as well as the comment under it from Harun, more specific to my situation) solved the issue.
I create a big JavaFX application that works fine in desktop.
In Android, its size is about 20 Mbytes.
Now, for deploying it for Android, I have installed Gluon (JavaFxPorts).
With a small program (using the JavaFX transitions notions, timeline, ...), I have generated an .apk by calling the androidInstall gradle task. That works fine, except I cannot automatically install the .apk file in my phone. I do copy/paste from my desktop to my phone.
BUT, when I want to do the same process with my big application, at the end, my phone screen is already black.
Therefeore, even if this big application works fine on my desktop, it is necessary to debug it for Android on my desktop, too. But, I don't know how to?
What to do with apkDebug gradle task, ..?
gluon+gradle does not provide a kind of Android emulator that allows to finalize the debug on desktop for a smartphone with its specific features (size of screen, landscape orientation). Do you agree?
What is the additional tool that allows to do that?
Moreover,when the application is deployed in the smartphone, does it exist a tool that allows to finalize the debug on smartphone?
Thant you for your response
Note: I have installed Android SDK manager and its AVDM in Eclipse, but with the JavaFX use, it is impossible to use it, isn't it?
Debugging JavaFX projects on Android so far doesn't work on Android emulators.
Command Line
The usual approach is just log messages to the console (i.e. System.out.println() or Log.v()...), and then using adb logcat.
On command line, go to your Android sdk folder, enter into the platform-tools folder and run adb logcat -v threadtime. That will give you all the log messages from your device, so you'll need to find your FXActivity pid there and filter through it.
Another possibility is using Android's monitor under the tools folder, a GUI tool that will allow filtering the console messages.
Eclipse
There is an ADT plugin for Eclipse, that can be installed following this question. This will allow you displaying logCat and device windows among others. Basically this will offer the same options as the monitor tool.
However, this doesn't seem to work with recent versions of logcat.
Android Studio
You can import your gradle project with Android Studio and enable the Android framework, so you can open the Android Monitor, and easily filter the logcat messages, or switch to the monitor tab with live charts of memory, cpu, ...
Black screen
Typically a black screen means you have some exception going on, so you need to use any of the above mentioned logging methods to track it down, solve it and try again.
I have Eclipse with Android Development Kit (ADT) installed, and also SDK. I have connected my Venue7 tabled and enabled USB Debugging.
I've created a simple Hello World app and ran it on my Venue7.
Now is it possible to update the app via Eclipse and see the result #Venue7 in real time? Or do you I have to stop the app and start it again after each change?
When you install your program on your device you are doing just that - installing it. The .apk file you have there is an installation package (apk stands for android package) not an executable file. So yes you have to reinstall it each time you have made changes to the program.
On eclipse I believe you just click the run as android program as the other poster said.
If you are using for the first time, Just see the left side, in package explorer, right click on your package- Select Run As Android application.
You dont need to stop an app. Just Run it from eclipse
If you have made changes in source code and you want to see the effects, you no need to stop the app/device or emulator. But you need to re-run the package again.
You can do this by 2 ways:
Right-click project, run as Android application
CTRL+F11 is to run the application. But for this you have to apply pre-settings as below.
Windows>Preferences>Run/debug > Launching : Launch Operation; "Always launch the previously launched application"
I recently got introduced to Android via a school course. Did some very simple examples earlier, and decided to installed all the required peripherals at my home computer too. I was on my way to develope all kind of cool stuff, until i noticed that something is wrong with my Android SDK or the emulator itself - it won't run any of the programs i try to.
I've got Eclipse & All the required add-ons / plugins installed. I get no error messages at any stage ( in eclipse or in the emulator itself ). Whenever i press run at Eclipse, the emulator takes it's time and starts up, but doesn't start the program, and doesn't actually show even the slightest hint of it. Looks just like if i had tried to start only the emulator. I've tried to create several different AVD's, and tried to use different versions of Android on them. No luck.
Im using windows 7 x64, and after a couple of rounds with Google, i found a few other guys who are having the same problem with the same OS.
Any help is greatly appreciated, as im running out of options here.
You need 32 bit eclipse and 32 bit JVM. There should be an error in the "console" window in eclipse if you hit run.
Click on the Menu button of the emulator to unlock it. You may then need to rerun the app.
Many times I cannot get my application to install on the emulator.
I receive the following error from Eclipse:
[2010-08-06 09:33:48 - Emulator]
2010-08-06 09:33:48.868
emulator[392:903] Can't open input
server
/Library/InputManagers/MultiClutchInputManager.bundle
The emulator boots, but the application is not installed.
MultiClutch is a 3rd party preference pane for OS X that allows you to capture gestures and specify what they should do. I've uninstalled MultiClutch (using AppCleaner), yet I still receive this error. I'm not quite sure what makes Eclipse decide to ignore it, but after attempting to run enough times, a NEW (read: second) emulator window will open and the application will install.
Any ideas?
This is because of the library component of the Android is not proper.
solution : what you can do is update the Android SDK. and create new AVD and install latest ADT plugin it will be resolved