How to start out

RonNYCRonNYC Member ✭✭

I'm using VS 2017 Community. Xamarin is installed. I've created a few very tiny apps which sort of run. I'm used to creating C# native Windows apps. I build them and then run them. I do not know if my Xamarin experience is normal or due to something not right.

I'll create an app, like "Phoneword" from docs.microsoft.com/en-us/xamarin/xamarin-forms/get-started/hello-xamarin-forms/quickstart

It compiled. I am running the Android Device Manager (which I assume is required), Android_Accelerated_X86_Oreo.

Is that the "right one"? I don't know. Do I need ADB? I don't know.

So I built my PhoneWord app; the Android window appears but nothing happens. It's blank. I do this a few times and finally the app does come up. Is that normal? I mean, do these apps take a very long time to start up? I put a breakpoint on MainPage.xaml.cs InitializeComponent() and it's reached so that's hopeful. Anyway, after a few times the app does appear and, slow as it is, I can interact with it.

I built (based on developer.okta.com/blog/2018/01/10/build-app-for-ios-android-with-xamarin) HelloApp. That too worked but seems to be running outside of the VS environment.

The apps are very slow to come up. Is this normal? or due to components being out of date, perhaps? My computer has 8gB of memory.

BESIDES ALL THIS, What I am trying to do is port an app I have in WIndows (winforms app) to Android. It will have a few screens, no web portion at all. I am porting it so avoid the years-long rewrite of some central code.

Any pointers, references, recommendations, etc., are totally welcome.

RON

Answers

  • GauravKatdareGauravKatdare USMember ✭✭

    Hi @RonNYC ,

    You don't need to download ADB, it comes with Android SDK and also you don't need to worry about it as ADB runs in background.
    I recommend you to use a physical device to test your code as deploying app to emulator is very slow.
    Also if you are using physical device you don't need to use Android Device Manager.

  • RonNYCRonNYC Member ✭✭

    Thank you for these pointers. Quite helpful. I decided this morning to deploy to my physical device. Yes, the emulator is quite slow.

  • JohnHairJohnHair GBMember ✭✭✭✭✭

    @RonNYC said:
    Thank you for these pointers. Quite helpful. I decided this morning to deploy to my physical device. Yes, the emulator is quite slow.

    Depending on your PC and Windows version you can run accelerated versions of the android emulator that are quite fast.

  • RonNYCRonNYC Member ✭✭

    Tried to install (i.e., copy) an APK over to my phone. I'm using ADB. The phone is directly connected into the computer (USB).

    BUT I get this error:

    All I did is create the app.

  • RonNYCRonNYC Member ✭✭

    No idea why I got that error but I successfully deployed to my phone!!! YEAH!

  • RonNYCRonNYC Member ✭✭

    And now I cannot. I know Einstein said the definition of insanity is doing the same thing twice and expecting a different result. So I'm not sure what this makes me. I connect my phone to my computer (USB). The phone is connected. I go into VS and Deploy and it deploys the APK to the phone and that's great. Now I try that again and 1) adb server doesn't work:

    But (I assume because VS cannot find the phone) when I deploy VS started the emulator.

Sign In or Register to comment.