So recently I installed Android Studio for work at college, but can't make the emulator work and I don't know how?. I installed everything it needs HAXM and etc and the process is always getting killed, tried to look at the Command-Line and no errors are found.
Any Tip?
Command Line
Devices
Run Android Studio
SDK
You should first check if your system meets the requirements: https://developer.android.com/studio/run/emulator#requirements
Then simply follow the official tutorial in the Android Dev Docs: https://developer.android.com/studio/run/emulator#install
If then still errors appear you should take a look at the logcat in Android Studio.
Related
I built simple cordova android app, for that I'm trying to run in my physical android mobile.. but it showing
No target specified and no devices found, deploying to emulator
No emulator specified, defaulting to VisualStudio_android-23_arm_phone
Waiting for emulator to start...
Any suggestions or help would be appreciated.
I recommend not to use the built in Android emulators from Visual Studio. Instead, download the Android SDK Manager and then change your Visual Studio's ANDROID_HOME path to use it:
To download and update the Android SDK standalone refer to Download System Images and create Android emulator in that page.
Notice that if using VS2017, your Deploy to Emulator option will be gone, but there are workarounds to keep deploying to emulator manually.
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!!
Android Studio (Windows 7) is giving me the "Unable to create debug bridge" error, as this person describes:
Unable to create Debug Bridge: Unable to start adb server: Unable to obtain result of 'adb version'
I have tried pretty much every solution I've found and then realized that I just recently installed Xamarin for Visual Studio 2015 as well, and I'm thinking that has screwed up Android Studio. adb works fine from the command line. A Google search didn't turn up any relevant results for this issue but I'm hoping someone can at least confirm that these IDEs don't play nicely together, and ideally even present a solution. I can do my installation from the command line but of course that's a pain compared to just clicking a button in the IDE, not to mention the inconvenience of using the command line to view logcat.
When you installed Xamarin, did you see if another SDK was installed in a different location in your computer? Because this happened to me. I had Android Studio installed then I installed VS 2015 with Xamarin but I didn't realize that the option to install android SDK (with adb and etc) was enabled. After realizing that, I changed Xamarin configs to point to my older SDK folder (the one used by Android Studio as well), then everything worked.
I installed Appcelerator on Windows, am trying to see android output.
I managed to add an android device by downloading - launching an android emulator called Genymotion. Now I have an IP address added to the Run menu, when I activate it Appcelerator tries to launch: console messages appear. But after 1minute or so I get a message saying I should download an SDK API level 23.
I had an old version of Android Studio, I updated it, opened its SDK manager tool and downloaded everything I could find, rebooted, but error persists. I can see Android version 23 in the list.
Here is the error message:
[ERROR] : No valid Android SDK targets found.
[ERROR] : Please download an Android SDK target API level 23 or newer from the Android SDK Manager and try again
I had the same issue recently and it turned out to be the java JDK missing from my path.
Take a close look at the Appcelerator environment variable documentation for windows.
Below are some java directories included in my path on my new Windows 10 machine:
C:\ProgramData\Oracle\Java\java;
C:\android-sdk-win\tools;
C:\android-sdk-win\platform-tools;
C:\Program Files (x86)\Java\jdk1.8.0_65\bin;
Also, I really suggest using GenyMotion (which I avoided for years) to run your emulators, turns out to be incredibly fast, easy to setup and they have free Basic Version.
Best of luck.
Now I have an IP address added to the Run menu
Studio should detect Android & Genymotion emulators and allow you to select from a list. No need to enter the IP. If you don't see the emulators, run appc ti info -t android to see if there's any issues that need fixing.
I did a fresh install of Xamarin Studio on Windows 7. Tried to run the simple Hello world Tasky app....
"Could not find android.jar for API Level 10."
Alarm bells! Here we go again...so in the Android SDK Manager I can see that API 10 SDK was indeed not installed so I tried to install from Manager but came up with the following error:-
Downloading SDK Platform Android 2.3.3, API 10, revision 2
URL not found: C:\PROGRA~2\Android\ANDROI~1\temp\android-2.3.3_r02-linux.zip (Access is denied)
Done. Nothing was installed.
MOre alarm bells...So, I had to physically give my self write access to the folder in Windows and then also the platforms folder in the android sdk folder...hard work!
So now the solution builds, but still won't run! ... the default Galaxy Nexus emulator starts but then doesn't run Tasky..... Its enough to drive you nuts man.
There seems to be a lack of robustness like checking which android API is targeted for the project against an appropriate emulator version? Thats without even mentioning the Windows file permissions!.
What do I need to do get Xamarin Studio to run the simple Tasky demo app?
This happens when you don't run the SDK Manager with elevated permissions.
Run the SDK Manager as Administrator
I ran the API 15 Emulator and it spun up the demo app, but Xamarin Studio has crashed out a few times on Windows so probably best to use Visual Studio as you will get better Intellisense, code completion etc