Android emulator opens, but project does not deploy and start

2

Answers

  • tshuvotshuvo BDMember

    baaal same problem

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭

    @shadisymon said:
    hello
    I have the same problem and tried all the ways until you come to that solution
    1- from list>> tools >> select (visual studio emulator for androad )
    https://my.pcloud.com/publink/show?code=XZE9dgZhnkTGeXQV1jIQXSEbQ6oz8DkD0Hk
    2- lunch your device
    https://my.pcloud.com/publink/show?code=XZRMdgZfa7G3fgQLamKK7O0QFld4uj1L8hk
    3- bulid your project
    https://my.pcloud.com/publink/show?code=XZ8MdgZAwk7XDNDLu5kD2wf2S5ljLJh25Q7
    4- enjoy with work
    https://my.pcloud.com/publink/show?code=XZjMdgZTuqEaWnPJgVUl78YjJGd6upIeKnV

    Important note: you must choose same device that has been it runs

    No use...see the attached screenshot. It doesn't even deploy to the emulator...

  • VijayPawar.0297VijayPawar.0297 USMember ✭✭

    this might help you.
    stackoverflow.com/a/32564067/7009636

    7 Step answer

  • AngeloChielloAngeloChiello ITMember ✭✭

    @Grazi said:
    I solved it by accessing regedit.exe, navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android, and changing the SDK path to my Xamarin Mono Android SDK folder.

    The path originally was C:\Users[User]\AppData\Local\Android\android-sdk
    then I changed to
    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK
    thent it worked :)

    This link gave me the clue.

    Thanks @Grazi Save my dayS.. been working on it for a long time!

  • @Grazi Thanks.. It works for me :smile:

  • KitiaraKitiara USMember

    I've applied these 2 solutions and now it works!!

    Without it the Emulator launchs and the app starts and ends so fast you never notice.> @Grazi said:

    I solved it by accessing regedit.exe, navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android, and changing the SDK path to my Xamarin Mono Android SDK folder.

    The path originally was C:\Users[User]\AppData\Local\Android\android-sdk
    then I changed to
    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK
    thent it worked :)

    This link gave me the clue.

    @DavidStrickland0 said:
    From the category of /facepalm
    One activity (MainActivity by default) must have
    [Activity(Label = "MyApp", Icon = "@drawable/icon", MainLauncher = true)]

    Without it the Emulator launchs and the app starts and ends so fast you never notice.

    Thanks!

  • kadokkadok USMember

    Hey u guys!

    I had the same problem, but in some cases everything works fine and in projects that I downloaded from internet many times isn't work.
    I'm using VS2015.

    For me this was the solution:

    1. Go to the Project Properties -> Build;
    2. Verify if you have a Platform Target and Platform;
    3. If not, customize one Platform Target for the entire solution: x86 or x64;
    4. I used x64 and now everything works for Android deploy.
  • ArashnsiArashnsi USMember

    @ramphani solution work for me!

  • shadisymonshadisymon USMember

    hello
    I found solution for this problem
    1- run emulator from -- tools >>> visual studio emuliter
    2- lunch your device
    3- start your project

    not>> you most select same device

    1- https://my.pcloud.com/publink/show?code=XZE9dgZhnkTGeXQV1jIQXSEbQ6oz8DkD0Hk
    2- https://my.pcloud.com/publink/show?code=XZRMdgZfa7G3fgQLamKK7O0QFld4uj1L8hk
    3- https://my.pcloud.com/publink/show?code=XZ8MdgZAwk7XDNDLu5kD2wf2S5ljLJh25Q7
    4- https://my.pcloud.com/publink/show?code=XZjMdgZTuqEaWnPJgVUl78YjJGd6upIeKnV

    enjoy

    you can send to me in de.shadi.sy@gmail.com

  • AvalonAvalon USMember

    I also had a warning to install the Xamarin Android Player. Here's the link where it's available at:

    https://developer.xamarin.com/releases/android/android-player/

  • BrianWallerBrianWaller USMember

    I had to do a combination of the above to get mine Android side to work.

    1.Go to the Project Properties -> Build;
    2.Verify if you have a Platform Target and Platform;
    3.If not, customize one Platform Target for the entire solution: x86 or x64;
    4.I used x64 and now everything works for Android deploy.

    and

    right-click on the Android project > Properties > Android Option > Deselect "Use Fast Deployment" from the Packaging tab > Save

    But Thanks you guys!!!

  • ucheEkeledoucheEkeledo NGMember

    @shadisymon thanks a lot, after months of trying your method worked for me.

  • moonclimbermoonclimber ITMember

    For me worked the solution of @Avalon. I have a pretty complex solution with 18 projects in Android configuration (38 projects in total, but this number is comprehensive of web and Windows Phone platforms).
    Just uncheck 'Fast deployment' option has solved.
    Thanks

  • RaphiaRaphia INMember

    Hi guys, first of all this is not a problem on your solution. The version mismatching (api levels) may cause this kinds of problems, i suggest you to just clean and rebuild your solution and create a new AVD with suitable configuration and run the solution. It will works.
    Happy coding.............

  • MichaelChengMichaelCheng SGMember ✭✭

    This works for me:

  • HarteexHarteex USMember ✭✭

    If anyone has problems deploying to the emulator after upgrading Xamarin, go into settings and then apps on the emulator and make sure to uninstall the Xamarin stuff there. Uninstall your app, Mono Shared Runtime and Xamarin.Android API-XX Support.

  • DanielMachadoDanielMachado BRMember

    I'm looking for a solution yet

  • JorgeZafraJorgeZafra USMember

    I tried all suggestions above but in my case none of them work.
    After some more troubleshooting I was able to figure it out on Windows 10 home edition.
    I removed any standalone installation of Xamarin and used only what Visual Studio Installer offers to install Xamarin (mobile cross-platform development for .Net)
    In Visual Studio do Ctrl-Alt-O to show the output window so you can see any error popping up during emulator launch and app deployment.
    In your emulators, make sure that the SD Card size in the emulator's configuration is big enough. I am using 1024 MB. I noticed in the VS IDE Output window that a message was coming as - not enough disk space.
    After increasing the SD card and recreating the emulator that you want to use, launch the emulator independently using Android SDK Tools -> AVD Manager.
    Go to the Apps section in the emulator (circle with little dots) and make sure you uninstall your application from the emulator.
    After that, open VS and load your solution. Select the emulator in VS that matches the one already running, and click the button to start building and deploying your app. (Your emulator Android version and API level need to be equal or greater than the Target Framework in your app's android manifest).
    After that you will see how your app gets deployed to the emulator.
    Once you are done testing your app, make sure you uninstall it again. You can leave the emulator running all the time. VS debugger will stop as soon as the app gets removed from the emulator. At that point you can make any changes to your app and redeploy as many times as you need without the need of launching the emulator every time.

  • ManjunathaNManjunathaN USMember
    edited March 12

    Hello Everyone,

    Same problem i am also facing. I have installed VS2017, on windows 7 professional. I am beginner to xamarin, i have created my first Hello Android application, and configured new Nexus 5 custom emulator using Android Virtual Device(AVD) manager by cloning Nexus 5. Everything worked fine and emulator started but my application is not getting deployed. searched a lot and tried to change the path as mentioned above,

    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK

    There is no such path(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android) in my system as suggested in the above link.

    So thought it might by an OS issue please let me know if its a OS issue ? if not what is the solution for the above issue ? so that i can deploy App on emulator successfully.

  • JefterDoreaJefterDorea USMember

    Good afternoon people,

    I have solved this problem easily, I believe that I must leave my contribution to the community, then it follows:

    In VS2015 go to the menu Tools> Android> Restart ABD Server.

    And it worked out that was a marvel.

    I hope it helps.


    Boa Tarde pessoal,

    Resolvi este problema de modo fácil, acredito que devo deixar minha contribução para a comunidade, então segue:

    No VS2015 vá até o menu Tools > Android > Restart ABD Server.

    E funcionou que foi uma maravilha.

    Espero que ajude.

  • AllanPeadAllanPead ZAInsider, University, Developer Group Leader ✭✭

    @JefterDorea if you are needing to do that, you most likely have more than 1 android sdk with another ADB server running.

  • IvayloKisyovIvayloKisyov USMember ✭✭

    @Grazi thank you for sharing your solution !!!! You saved my life.. I was stuck on this for ages ...

  • ElyfranVazElyfranVaz USMember ✭✭

    @Grazi thx =D

  • kenneth.leekenneth.lee USMember ✭✭✭

    @MichaelCheng I came across your post and it help me fix my issue for running on a HAXM emulator. Thanks!

  • SS.6981SS.6981 USMember

    @lufo88 said:
    Same problem. the solution of @Grazi not work (I haven't the sdk in C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK, it's in C:\Users[User]\AppData\Local\Android\android-sdk).
    in C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid I have only a a keystore.
    I try to disable also fast deployment, nothing change.
    I can deploy on a device

    I try to deploy on a VS emulator, API 4.2
    Any idea?

    Did you find a solution?

  • pawanmorpawanmor INMember

    Open Registry Editor by selecting Run from the Start buttons context menu, typing regedit in the dialog box, and choosing OK.
    Navigate to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android SDK Tools in the folder tree on the left.
    Modify the Path registry variable to match the path to your Android SDK.

  • N_BauaN_Baua INMember ✭✭✭✭✭
    edited April 23

    @Grazi said:
    I solved it by accessing regedit.exe, navigating to HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Android, and changing the SDK path to my Xamarin Mono Android SDK folder.

    The path originally was C:\Users[User]\AppData\Local\Android\android-sdk
    then I changed to
    C:\Users[User]\AppData\Local\Xamarin\MonoForAndroid\AndroidSDK
    thent it worked :)

    This link gave me the clue.

    Lovely! this still works Nope the application icon (Xamarin Logo) appeared for a while and vanished.

    I must say Google is rigid for this OR VS 2017 when allowed changing via their toolbox should have updated in registry too!.

    N Baua

  • AdamTuliperAdamTuliper USMember

    @JefterDorea works for me and its a brand new install - thanks!

  • JefterDoreaJefterDorea USMember

    @AllanPead said:
    @JefterDorea if you are needing to do that, you most likely have more than 1 android sdk with another ADB server running.

    ====================================

    Glad to have contributed. Big hug

  • VardanHoVardanHo USMember

    I had the same issue on Win 10 Home and VS 2017 (latest updates applied to both at the time of this post).
    For me the issue got fixed after I installed the latest Android SDK updates from Tools -> Android -> Android SDK Manager

  • N_BauaN_Baua INMember ✭✭✭✭✭
    edited May 25

    Need to run the updates multiple times. It did fixed in the end. :wink:
    N Baua

  • VardanHoVardanHo USMember
    edited May 25

    Like others suggested, other things to try are
    1. Restart the adb sever from Tools -> Android -> Restart Adb server
    2. Disable Fast Deployment by right clicking on Android project in your solution -> Properties -> Android Options tab -> uncheck "Use Fast Deployment"

  • ChanHaengLeeChanHaengLee USMember

    @Grazi
    Thank you for your solution! it works for me.
    However my address is a little bit different.

    C:\Users[User]\AppData\Local\Xamarin\Mono for Android
    In this address, there is not the AndroidSDK folder on my computer.

    So I referred to @ArielBaus

    my address which has the AndroidSDK folder is
    C:\Users[User]\AppData\Local\Xamarin\Universal\AndroidSDK

    So I changed C:\Users[User]\AppData\Local\Android\android-sdk
    into
    C:\Users[User]\AppData\Local\Xamarin\Universal\AndroidSDK

    after editting like this, my project is being uploaded well on the emulator

    Thanks!

  • dev.kramdev.kram PHMember ✭✭

    If all above still fails, you could try these:

    • Right click your project -> Debug -> Start new instance
    • Relocate your project into a path with no special characters, including spaces

    There might some occasion that your app won't automatically launch by adb, in that case, you will manually launch it.

  • Am-i-neAm-i-ne MAMember

    @ValerioFerreira Your solution for updating the Android SDK path on the registry Worked for me. Thank you

  • IsidorosIoannouIsidorosIoannou USMember

    I have tried every solution but nothing worked for me in VS 2017. The strange is also that my android sdk is located in C/ProgrammeFiles(X86)/Android/android-sdk. I can not deploy the app neither on physical device nor in emulator. I used google emulator and vs emulator but nothing. Any other suggestion?

  • TiagoBrenckTiagoBrenck CAMember

    Changing your Android app extension from XXX.Android to XXX.Droid solves the issue. This is due a conflict with the "Android" word

  • elisatelisat FRMember

    For me it was just the cache. Uncheck that box.

  • Howdy-HoHowdy-Ho USMember

    @shadisymon said:
    hello
    I found solution for this problem
    1- run emulator from -- tools >>> visual studio emuliter
    2- lunch your device
    3- start your project

    not>> you most select same device

    1- https://my.pcloud.com/publink/show?code=XZE9dgZhnkTGeXQV1jIQXSEbQ6oz8DkD0Hk
    2- https://my.pcloud.com/publink/show?code=XZRMdgZfa7G3fgQLamKK7O0QFld4uj1L8hk
    3- https://my.pcloud.com/publink/show?code=XZ8MdgZAwk7XDNDLu5kD2wf2S5ljLJh25Q7
    4- https://my.pcloud.com/publink/show?code=XZjMdgZTuqEaWnPJgVUl78YjJGd6upIeKnV

    enjoy

    you can send to me in de.shadi.sy@gmail.com

    Thanks. This worked for me. Quite a bummer. Have no idea why some solutions work and some don't.

    Cheers.

2
Sign In or Register to comment.