Xamarin Fail to initialize device - android

Im a freshman of Xamarin. Pls help.
I just followed the guideline of Xamarin
https://developer.xamarin.com/guides/android/getting_started/hello,android/hello,android_quickstart/
until the step of 31
Finally, we can test our application by deploying it to an Android emulator. If you have not yet configured your emulator, please see Xamarin Android Player for setup instructions. In this example, we have installed the Nexus 4 (KitKat) (Android 4.4.2, API Level 19) virtual device and we have started it from the Xamarin Android Player Device Manager console:
I run the Xamarin Android player to test this quick start, it has a problem,
I got a message: Fail to initialize device
I google it with 0 answer
suck this account need a 10 reputation to upload a picture , how I can get the reputation?

Try to check your installed devices.
When I installed Xamarin Android Player no devices were downloaded automatically. You need download and install all you needed devices manually.

For now it's better to use Genymotion but in the future Xamarin Android Player will be a good alternative too,
if you want Xamarin Android Player for now, install the latest version and download manually a device, Make it start and try again.

The solution can be in enabling virtual technology in the bios.

I had same issue.
My solution was to enable
I had to go to My 'Network Connections' in my control panel, found the Connection named 'Virtual Box Host-Only Network', right clicked it and went to the properties and CHECKED the option 'VirtualBox NDIS6 Bridge Networking Driver' and reconnected. This fixed it for me.

Related

Why Android studio won't run app on Android Pie (9.0)?

I've upgraded my Google Pixel to Android 9.0/Pie.
When I try to run an application from Android studio I don't see the Google Pixel in the list, there's only a null device named FA69R0306649. When I run my application, Android studio tries to install the app but then fails.
It looks like Android Studio is not recognizing the phone anymore. It Worked perfectly fine a couple of hours ago under Oreo (8.x).
Also, if I deploy the app on google play as alpha and then download it runs perfectly under 9.0/Pie.
Any suggestions to get the run/debug working with android 9.0 phone under Android Studio (3.1.4)?
The Pixel running 9.0 requires USB 2.0 high speed.
Apparently the Pixel running Android Pie cannot talk to the PC using neither USB 3.0 nor USB 1.1 full speed nor USB 2.0 running at full speed.
I had a similar problem with my Xiaomi Mi A1. When I upgraded from Android 8.1 to 9 Android Studio would hang on "Installing application" forever.
After trying revoking USB debugging authorization and completely reenabling developer options with no success it turned out a simple restart did it.
Looks like there are multiple issues that lead to the same problem.
I had the same issue with a Xiaomi Mi A2 after upgrading to Android 9. If you are using Linux, try adding the udev permissions manually, following the steps described here. In my case, that was the only solution that worked.
Please re-enable developer options again after the OS version upgrade, the device name will appear and it will be working fine again
Install Sdk Platforms of Android 9. In Android studio Top Right besides Search Icon.Press That Icon of SDK manager and look either sdk platform is updated and installed.
A simple solution just go to your Developer option on your phone , right below the USB Debugging option it says to "install via USB" just enable it and you are all set to install an app through android studio into your 9.0 device.

How to develop android apps with xamarin without hyper v and emulator

I am using windows 10 home and visual studio 2017. I want to develop android apps with xamarin. Hyper-V feature is not available on windows 10 home and I can not afford pro version, So emulator is not installing without hyper-v.
What should I do to develop android app?
Have anybody idea to deploy android app without using emulator and hyper-v?
Thank you in advance!
It's possible to develop Xamarin app without using the emulators. But in that case you'll need to have an Android device to deploy your app on.
Setup Android SDK Manager on your system. Although Xamarin includes a
SDK Manager, you can download it from the following link. Android SDK Manager download
Setup the ADB (Android Debug Bridge) on your system (install Google USB Drivers)
Connect your Android device to the system after you enable USB Debugging(Developer options) on it. Once the device is connected it will give you a prompt to enable debugging. Tap yes and you'll see the option to build to your device as shown in image.
You can try to use any avaliable on windows android emulator. I like to use Bluestack (https://www.bluestacks.com), the steps for use it below:
Install Bluestacks emulator
Launch emulator and wait for load finished
It's your wellcome screen, your application and apps from store will be here
Go to settings > Preferences and check "Enable android debug bridge (ADB)" + "Enable Android input debugging"
One time Setup finished
"Open android adb command promt" and type
adb connect 127.0.0.1:5555
If you have done everything good you will be connected to emulator and ready to debug your application
Good luck!
UPDATE:
As of visual studio 2019, non-hyper v emulation has been stopped.
Old Answer
I am very positive that at the time of VS installation the Visual studio emulators for Android are readily available for download and use, there you can find a good amount of android emulators also it provides you with Android SDK which again can be used to create Android emulators without using Hyper-V
The below link contains all you need to know about Visual studio emulators including on how to install :
https://msdn.microsoft.com/en-us/library/mt228279.aspx
Hope this Answers your question.
Goodluck!

Xamarin Android Player Freezing

I've setup the latest Xamarin Android Player (XAP) on my AMD64 server running Windows Server 2012
Hyper V has been uninstalled.
Before doing so I uninstalled Virtual Box and let XAP install its version.
When I start XAP with device Nexus 7 Lollipop it boots to the Android logo and goes no further.
What is wrong?
You need to post errors and logs.
VirtualBox should be installed I believe for the Android Xamarin emulator to work.
However, you could try reinstalling the Android player. Make sure virtualization is enabled in bios.
If worse comes to worse, you can install the Android AVD manager and use the normal Android emulator which also works on Xamarin.
The Xamarin Android Player is still in preview, any issues with can be addressed with bug report at https://bugzilla.xamarin.com/newbug
Please include the logs when you file a bug, you can generate logs by Right-click bottom bar > Generate Bug Report
In the meantime, I would recommend you to use Visual Studio Android emulators
In addition to what Prashant suggests, you can also try a different simulator image. Some of the XAP device images seem to be unable to boot properly on some machines. I've not seen any issues under OSX version of XAP, but the Windows version seems to be affected on some systems.

Android Beginner: Trying to run my Android app on my Nexus 5

I'm a beginner in Android development, and I'm trying to figure out Eclipse and the development environment and how everything is set up. I found a guide on developer.android.com, but it really isn't helping to get my test app running on my devoce. I've connected my Nexus 5 to my PC, I've enabled USB Debugging and all that. I have a simple app created... but when I try to run it, it only wants to run on the Virtual Device. The guide I'm following just says "Enable USB Debugging," but that doesn't seem to do the trick. What am I missing? How do I run my app on my device?
You need to install the Google USB Driver, which comes in the Android SDK platform see more here: http://java.dzone.com/articles/how-enable-usb-debugging-nexus

Unable to connect Glass to run gdk samples

I have Glass with version 4.0.4, XE 12.1
I just installed the latest ADT with Android 4.4.2 (API 19) and Glass Development Kit Preview.
My problem is when I try to run samples, DDMS shows the Glass device as being online but when I try to run the application, it gives the following error on the console:
Automatic Target Mode: Unable to detect device compatibility. Please select a target device.
When the Android Device Chooser window opens, there is no entry for Glass in the list.
Glass has debug mode turned on and is visible in DDMS but just not compatible for some reason.
This also brings me to a related question. I just received my device in the mail yesterday and left it charging overnight but still has not updated to XE 16. Glass is connected to wifi and the internet is fine on it. What do I need to do to force it to update itself?
Thanks for your help.
You might try the following:
First, make sure that your Google Glass is updated to XE16 (connect to your home/business wifi; plugin charging cable). Do not attempt to go further until your Google Glass has updated
Once that is done, you might look at some of the other answers to "how do I connect". Some of the steps for this are shown below.
What OS are you using (Windows?). Let me know and I will update the answer with what I had to do to see Google Glass (or look here )
I guess you set the wrong project target.
If you are using Eclipse, open project.properties and make sure the target looks like this:
# Project target.
target=Google Inc.:Glass Development Kit Sneak Peek:15
Not
# Project target.
target=android-15
You can try:
Open project properties (Alt+Enter) -> Android -> Project Build Target -> Glass Development Kit Sneak Peek
BTW, IMO, Glass update is pretty random. I have no idea how Google decides who gets the update. You can flash the system image if you don't want to wait. Please see https://developers.google.com/glass/tools-downloads/system. (Warning: Rooting, unlocking, or flashing your Glass voids your warranty.)
The fact that Glass is displayed under DDMS shows, it is being detected by ADB. The reason you are not able to run the app on Glass is that, your current version of GDK is not compatible with Glass XE 12.1. If you run projects with Android 4.0, you can see your device listed.
In order to resolve this issue, upgrade Glass XE to the latest and try running the app. Then your device will be listed under currently running devices.
Glass XE will be automatically upgraded. Make sure your device is connected to WIFI, connect device to the charger and restart.

Categories

Resources