I have have been using the Android emulator both and the command-line and in Intellij for some weeks running ApiDemos and my own apps with no problems.
Now, without any exceptions or messages to indicate the reason why the emulator will only run the emergency call app and nothing more.
Is this a bug? If so, how do I create an issue for the Android SDK dev?
I'm cautious to load any .apk now into my handset to see if the condition is the same.
Particulars follow:
OS: Ubuntu 12.04
Android SDK: 4.1 (ICS).
JDK: 1.7.x
Maybe a stupid answer, but are you sure you didn't set a PIN code on the lock screen? This will load the PIN entry screen whenever you load the emulator but still allow you to make emergency calls.
You have to set a PIN on Android ICS when you save new security certificates, which caught me out.
You need to use 2 GB of RAM o avoid that problem in your android emulator.
Related
I use my mobile device to run my flutter applications. I know all about the hot reload but I'm so tired of having to wait every time I connect back to my phone again maybe the next day and then the app has to be re installed and the gradle task assembler has to be built again. Please I want to ask if there is a way to reconnect easily and a way for the apps to run easily again any time I want to work on a project again after a while.
There are a couple of alternatives to building the APK and installing it on a physical device:
Use an emulated android device
You can use an android emulator. The easiest way to set that up is probably the graphical interface in Android Studio (see https://developer.android.com/studio/run/managing-avds), but you can also use flutter emulators --create [--name <Name>] to create a new virtual device. Then use the button in the bottom right of VS Code to select that device, before launching the debugger.
Build for desktop
Depending on the dependencies of your app, you could try building the app for the platform you're developing on (Windows, Linux, or macOS). This has the same visual result as an Android app, but does not need an emulator or physical device. The rendering engine is the same (Skia) on all platforms. The obvious downside is that some plugins may not be available for desktop.
See https://docs.flutter.dev/development/platform-integration/desktop on how to set that up.
I am aware of Genymotion openGL error stack overflow question.
I am attempting to run Genymotion on a Windows 10 system, but the graphics adapter is Intel G45/G43 Express Chipset WDDM1.1 and the driver supplied does not support OpenGL and Intel appear to have no interest in delivering a driver that does for Windows 10. I understand that officially this combination is not supported.
But here's the thing: I can start a Genymotion VM fine from Virtual Box, and it appears to work (almost) perfectly, as far as I can tell.
Certainly I don't see any problem with the graphics.
This must be using some (probably Virtual Box provided) software implementation of OpenGL.
However, when I try to start the same phone VM from the Genymotion console, or from the Genymotion button inside Android Studio, I get the error dialog-box in the linked question above.
My question is: Why is Genymotion insisting that there is OpenGL support from the real physical display driver? And of course, if its for a quality reason only (ie: sub-optimal user experience otherwise) is there any way to disable this check?
The reason this matters is that Android Studio does not list the Virtual Box started phone VM as somewhere an application can be run upon. I suspect that when Genymotion runs a phone VM, they set up something that the Android Studio integration needs, that simply running from Virtual Box doesn't provide.
In addition, I can't circumvent the Android Studio integration by deploying to a phone VM using the gmtool device install file.apk command bundled with Genymotion because this is a paid license feature. As you can imagine I am somewhat reluctant to purchase such a license when I know I am running in an unsupported configuration.
Purchasing new hardware also isn't an option for me in the short term.
EDIT: The justification for this question has since evaporated. Although I can't deploy using Android Studio or gmtool.exe, I have managed to deploy by using the phone web browser to fetch the .apk file. The gotcha here is that the web server must supply a Content-Length header or the download will fail. So I now have a workable solution.
{{{ Andy
I'm part of the Genymotion team. That's an interesting question. The answer is: yes, we ask for OpenGL drivers for performance reasons. Without this, the whole Android rendering would be handle by the CPU (as soft rendering) which is not fast enough to allow a real usage of the devices, with a seamless user experience, particularly since 4.3. If you run a 4.2.2 image from VirtualBox, you'll see the UI inside the window but the rendering will be very laggy.
As you maybe already noticed, running the Genymotion devices from VirtualBox works only for images up to 4.2.2 (released 3 years ago). The other image will show only a console window. And to be honest, you should more consider it as a side effect than a real feature. This behaviour could disappear on a future release for any reason. And there is no way to disable this check.
As you mentioned, this configuration is really weird and exceptional. As far as I know, we don't plan to support these kind of configuration and I don't see any real viable solution to make it work properly.
Also, to explain the problem you encountered with Android Studio. When a Genymotion device start, it gets a local IP. This IP can be used to connect it to adb. Then it is possible to interact with the device like with any other Android device. This is the tools used by your IDE (and (m)any other tools communicating with Android devices.
Usually, the Genymotion app does this for you, by connecting the newly started device to adb. But you can do it yourself by running adb connect <DEVICE_IP>:5555. Just be careful because this connection could not be permanent and you should have to run this command regularly in some situations.
I hope this answer will help.
Cheers.
So i'm having awful trouble trying to get the Emulators in the Android SDK to start up. I can create the AVDs just fine, and then when hitting the 'start' button from the SDK Manager, bring up the small loading console window, indicating that the emulator is launching. However, after that, nothing happens!!
I have read many threads and posts with people having the same problem, maybe to do with the settings requiring too much memory, with some people waiting 30 minutes for the emulator to load!!
When trying to run the AVD emulator through terminal, I simply get a 'Bus Error' with no further indication of what could be going wrong...could it be a memory issue?
What I did to get where I am now:
Download the Android SDK package for Mac. I'm extracting the sdk only, not eclipse. I'm on Mac 10.6.8.
Install the SDK, and download the latest version of Android in the SDK Manager, along with default tools.
create a AVD and hit start.
window pops up to boot the emulator, that process is complete and window closes.
Nothing happens.
My knowledge of the sdk tools are very limited, all I want is to be able to do some testing...
Any help greatly appreciated!
Thanks
Actually, the simplest way to get emulators running right now is probably GenyMotion. They provide an interface, and pre-configured emulator images to make it pretty simple to get running.
This is not an endorsement (I use the standard ADT myself) but a lot of people find their tools useful.
Here is my suggestion: instead of using AVD, start using espresso and virtual remote android hardware emulator from Google servers - also known as android-test-kit. You will have the possibility to run and test you App on several different devices, without the need to spend money on actually all different devices for developing and testing purposes before releasing your Apps. You find further details here:
android-test-kit
Why Espresso
The 2 videos are somewhat long, but worth watching.
Taking this approach will solve your problem, save you money, and improve your productivity.
I run into the same issue on my mac 10.6 and it only works if i do
emulator64-x86 -avd my_android
Besides, my virtual device has to configured using x86 but not ARM
maybe this link can help you.
I'm using IntelliJ Idea 13 to develop Android applications on Ubuntu 12.04 64-bit. But my virtual device never starts despite there is no error.. its screen always stays like this:
My Android target level is 4.4 (API 19). How can I solve this issue?
Edit: Here is my AVD details:
I Recommend you look at this post to a similar question.
https://stackoverflow.com/a/5535532/2978914
they are using eclipse but you should be able to view the logcat, other posts say first load can be ridiculously long.
the spec of your PC may come into play as this post https://superuser.com/a/347298 explains the way the emulator converts to arm opcode: direct quote:
To use emulator more effectively, this is my experience:
Don't close emulator everytime you run your application.
Scale the emulator screen smaller.
Disable snapshot (Yes, it's useful but it takes time to close the emulator).
Specify a file path for SD card image file. I use only one SD card for many AVDs.
If you got any problems in adb, just reset adb, don't close emulator.
Open few programs in your operating sytem.
If you are using Windows, don't ever close emulator. Do it combined with Hibernate of Windows.
My AVD has started after I check "Use Host GPU" option from "Emulation Options".
I'm using a mac machine to build a android application, but it will crashed when run on device. but with the same code and key I build the application using another machine (windows). it is working well on devices.
Using my mac I already build several other apps and those are working well.
Can any one give me a solution?
First get the feedback of your client device as Kumar suggested.
get the clients device specifications,screenshots and try to reproduce on emulator.Exactly what caused the error may want you to ask him what steps to follow to reproduce the error.etc
is it possible to test this app on emulator with out any code changes?
Yes.You have a DDMS perspective.Just go to the top right corner above the coding window.There's a sort of plus (+) button there.From there you have a DDMS perspective.In this perspective,you can control emulator.You can feed the GPS co-ordinates here.
Look at this
Sounds like you are using some new API that your client doesn't have. He might be running an older OS. Run Android Lint checks and see if you get an API warnings.
Check your client's OS version and your own. Create emulator with your client's OS version and see if it's crashing.