I'm using android studio about 2 weeks and everything is going right until I try to create a new app and the android studio ask me for updates to API level 22 and I did it. After this update my emulator doesn't load my app anymore, the emulator opens but the app doesn't show up and even appears at emulator.
Log:
Device Nexus_5_API_21_x86 [emulator-5554] is online, waiting for processes to start up..
I try to uninstall and install again the android studio but even reinstalling with API level 21 keep not working.
Even the default Hello World application doesn't load and not show up at my emulator.
I had the same issue, and was able to work around it by manually starting the emulator first, then running the app and choosing the running emulator
I had this same issue with my first app on android studio 2.1.2. I just tried to run it and see on emulator screen but app didn't show up there.
Remember to check the messages panel it saying something wrong with my java version. I had installed JDK 7. I installed JDK 8 and that fixed the problem.
Related
I've been learning Android studio and android app development for a while now and I've been installing emulator .I recently installed the Nexus 5S API 24 but that showed some emulator errors
enter image description here
And then I thought the problem is with the API and so downloaded an emulator with lower API i.e; NEXUS 4 API 18 and that is also not running showing the same error. I thought the problem is with android Studio and hence I uninstalled the whole Android
Studio and then downloaded it again.But again the same errors show up.
I tried connecting my phone as an emulator instead of downloading an emulator.
But then, something showed up like in the picture below
enter image description here
Mine is a Gionee P7 phone .
Any help on this issue would be helpful .
Open the SDK Tools (Tools> SDK Manager> SDK Tools) to check if you have installed the Intel X86 Accelerator, if not, check the box and apply, then restart your AS, it should work.
Still recommend you to use real device to run your application, since the emulator really cost a lot of memory resources.
I installed Microsoft's Android Emulator from here which can now work without disabling Hyper-V on Windows 10. I was following the instructions in this post and everything was working smooth until yesterday. I was successfully able to debug my app in MS android emulator.
Today morning I closed the emulator and started it again. Now, When I start running the app to test it then the MS Android emulator is not showing up in Select Deployment Target window of Android Studio as below. Nexus 5X API 28 emulator visible under Available Virtual Devices is Google's Android emulator which doesn't work with Hyper-V enabled due to reasons mentioned here.
I've already launched the MS Android simulator and it is up and running:
I can see it running in Hyper-V as well as shown below:
Not sure what happened suddenly and it stopped working altogether. Can anyone suggest me the reason behind it or I'm missing something?
If it didn't detected by IDE, try to rerun the emulator and check if it is detecting again or not.
Also, you can try this too:
Tools -> Android -> Enable ADB Integration
If it is already enabled, try to disable and re enable it, seems like this works most of the times.
EDIT: You may want to check:
https://stackoverflow.com/a/38788436/4409113
Changing the value Path then running following commands:
adb kill-server
adb start-server
Might help.
I happened to resolve it by chance. Sharing my experience in case it helps someone in future.
Initially what I was doing is as below:
Start Visual Studio Emulator for Android application which contains the list all the device profiles.
Choose an appropriate device profile and install it.
Run the installed profile and launch the emulator.
Start Android studio, open the project and launch the app.
I simply reversed the above steps to resolve my issue. First close everything including Android Studio, emulators, device profile window etc.:
At first, start Android studio, open the project and hit Run app button to show Select Deployment Target window.
Now, start Visual Studio Emulator for Android application which contains the list of all the device profiles.
Choose an appropriate device profile and install it.
Run the installed profile and launch the emulator. Wait for the Android operating system to get started fully.
The Connected Devices section in Select Deployment Target window would refresh on its own to start showing Microsoft's Android Emulator.
The adb.exe can be seen as an infected file by antivirius software. So need to exclude once reinstated.
I am new to Xamarin. I used Xamarin. Forms template to create a sample mobile solution in Visual Studio 2017. The process created four projects Xamarin PCL, Xamarin Android, Xamarin.iOS and Xamarin.UWP. Without making any modification to the generated solution, I am trying to run it.
The first issue is, when I set the UWP as the starting project, the Windows emulator shows up and runs the app perfectly. But when I try to do the same with Android, I get different errors at different times based on the environment changes I make. Finally, using the visual studio android emulator, the Phone UI shows up but not my app. In the background, I can see that Visual Studio completed the build process successfully without any errors but the deploy process simply hangs. I left the deploy running overnight but still running in the morning. Here is my environment.
Intel Core i7 processor
Virtualization enabled in BIOS
Windows 10 Education
32GB RAM
Hyper-V disabled in Windows
Executed bcdedit /set hypervisorlaunchtype off in the command window and rebooted.
I tried setting the above environment in different combinations but none of them seem to make the app work. When I use an android emulator from android SDK, the build process throws errors. The only emulator that even builds is the visual studio emulator. But the deploy hangs.
A second issue I have is, I have installed android SDK for version 24 and 25. But in the emulator dropdown, I can only see the emulators for 23. I checked the installation path both in visual studio and android SDK manager and they both point to the same installation folder. What do I need to make the emulators for version 24 and 25 usable?
I repeat, I did not make any change to the generated solution in visual studio before running it. I have been at it for the past three days and couldn't make it work. Please help.
I just installed Visual Studio 2017 (on Win10 15063.138) and found, like you, Xamarin projects won't deploy to Android. Here's how I got running:
Updated everything in the Android SDK Manager.
Installed the new, improved Android Emulator from MS:
https://www.visualstudio.com/vs/msft-android-emulator/
Used that to download/install an API level 23 (6.0 Marshmallow)
emulator
Started that emulator using the same tool (you'll see it running in Hyper-V Manager)
Selected same emulator in VS for deploy/debug (the emulators that ship with VS are painfully slow)
In VS, selected Android project for start-up and verified build and deploy to Android in build config mgr.
Note: MS doesn't appear to have any emulators above API level 23, so Compilation and Target settings for your Android project can be the latest, but the minimum target will have to be 6.0 (API 23).
After pulling my hair for the past few days, I finally got my Xamarin.Forms Android App to show my page on the emulator. Thanks to all the members for their suggestions. Ryan's suggestion helped a lot ( I +1ed him, thanks Ryan) but did not solve my problem. I googled further and found a suggestion that asked to change the following setting which did it for me finally. So, if anyone else get stuck like I did, please do the following (in addition to cleaning up and updating all packages):
Open up the setting for your Hyper-V vm for your emulator (while the VM is off).
Expand the Processor node on the left and click on "Compatibility".
Now put a check mark on "Migrate to a physical computer with a different processor version" on the right.
Start your emulator in the Visual Studio Emulator tool.
Now, start debug your android project in VS using the same emulator that is already running.
After a delay (there is always a delay), your app will show up on the emulator. Yey!!
I have just uploaded my Android Studio version to 2.3, and I am now having problems testing my app in my emulator. It is a Nexus 5X emulator with Android 7.0 Nougat loaded on it (API 24), with an ABI: armeabi-v7a (I have an AMD processor, so to the best of my knowledge I can only use this). Before, it was a bit slow and would sometimes come up with a 'Not Responding' error, but clicking 'Wait' would always do the trick.
After the Android Studio update, when I press 'Run', it opens up & boots the emulator. However, once booted, it gets stuck on the "Launching App - Installing APKs" process. It probably shows that it is doing this for about 2 minutes, before stopping. It then shows "Launching Instant Run Service" for a few seconds. The green 'run' arrow then becomes active again, as if there is no emulator open. The emulator is open, but there is no app. If I click the green 'run' arrow with the emulator already open, it does a gradle build sync & then doesn't even attempt to launch the app/install APKs - it only says "Launching Instant Run Service" for a few seconds, even though nothing happens.
I have tried removing the emulator & recreating it, and I have also tried fiddling with some of the parameters as suggested in other posts which concern similar (but not identical) issues to this. The first time I tried to run the app on the emulator after the update, I had many messages pop up in the event log, saying Android Studio Can't Bind to Local 86xx for debugger, whilst the Android Device Monitor was opened. Ever since then, with the ADM closed, I have had the problem described above, with no error messages showing in the error log.
Any help with this issue would be very much appreciated - please note it concerns the very latest version of Android Studio which I have only just had a popup requesting that I install. Build Tools Version in build.gradle has also been updated from 24.0.2 to 25.0.0.
If you haven't already done it:
Open Tools -> Android -> SDK Manager
Select tab SDK Tools, flag Android Emulator (version 27.0.5 at the moment) and Apply
This solution worked for me, hope this can help
I tried all of the aforementioned and it didn't help. What helped was disabling Instant Run in Settings -> Build, Execution, Deployment -> Instant Run.
Relevant issue in AOSP bugtracker: https://code.google.com/p/android/issues/detail?id=235879
Updating the Java SDK solved the problem for me.
you need to download the Android Emulator for Android Version 2.3 or make sure when you updated your AS from 2.2 to 2.3 all these components got updated and installed. I had the same problem and i just downloaded the Android emulator and it worked fine for me.
had the same problem, after two days of trying to solve this, i decided to uninstall android studio, and then install the new virsion 2.3 all over again, now Emulator working just fine!
*not much of programming, but it did the job!
Don't worry about updating anything. For some reason upgrading to 2.3 makes the default setting for running your app set to "androidDependencies" which does nothing except give you strange errors. Just go to Run -> Edit Configurations and in the window that pops up try to delete with the minus symbol the selection on the left pane with the task called android dependencies. Then click on "app" under the "Android App" expandable arrow at the top. (see the pic)
edit configuration window
I recently download Android Studio 2.3 and installed default components and some Android OS for emulator. When I use an emulator (version 26.0.0) I have problem with its sound and image (display is very poor).
I'm using Ubuntu 16.04.2, Kernel 4.8 and KVM is setup.
It's an example of my problem:
I think you've not enabled the developer settings in your emulator. Sometimes after update the emulator is reset and all the settings are lost. Enabling it, should solve the problem.
I am trying to run the Android emulator on a 64 bit Windows 7 machine. I have installed the Android SDK, JDK, Eclipse, and the Android plugins for Eclipse. From the SDK Manager, I have installed the Android SDK Tools, as well as all of the files for Android 4.1 (API 16).
From Eclipse, when I want to open the emulator I select the AVD Manager and click on a device that I have created. The AVD Manager says that the virtual device is a valid device. When I launch the machine, a box pops up that says "Starting Android Emulator," and there is a loading bar right below it. The bar will get to about 95%, and then the box will disappear and nothing will happen. There will be no errors and no messages in the console output box in Eclipse. I get similar behavior when I try to launch the emulator by running an app from Eclipse.
I have tried uninstalling and reinstalling the SDK to a new directory, as well as downloading a different version of Eclipse (I am currently using Eclipse Java EE, earlier I was using Eclipse Classic 4.2). I also tried downloading the API 15 platform and using that as a virtual device, and I still have the same issues.
I have checked my task manager, and the only new process that is ever created is adb.exe, and this only happens when I try to run my app, but not when I start the emulator on its own.
Any idea what might be causing this, or what methods I might use to troubleshoot this that will actually give me some kind of error message, rather than just disappearing and not doing anything? Thanks.
Edit: When I try to run the emulator from the AVD Manager directly, I get the same behavior as when running through Eclipse (loading box pops up, then disappears, then nothing).
Try to use BlueStacks emulator instead standart. It work much more faster and reliably. You can download it from http://bluestacks.com. After installing reboot the system. I think all be fine.
I had the same problem. Enabling Host GPU emulation worked for me.