Android emulator opens, but project does not deploy and start

13»

Answers

  • HarteexHarteex USMember ✭✭

    @elisat said:
    For me it was just the cache. Uncheck that box.

    It should work with that option selected, it does for me. And it's a very useful option, especially if your app has login.

  • N_BauaN_Baua INMember ✭✭✭✭✭

    @Harteex said:

    It should work with that option selected, it does for me. And it's a very useful option, especially if your app has login.

    Great, Never knew that could save lives.
    Though, I would rather use other means to retain the AppLogin values then to rely on cache entirely.
    Thanks for sharing though, Most of the times, you never know with Xamarin what makes and what breaks your things.

    Regards,
    N Baua

  • @Grazi Thanks very much. That worked for me - thought I was going crazy!

  • MastartMastart KEMember

    Make sure 'mainactivity' class is the first class in line immediately after
    [Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]

    Worked for me...

  • PiyiPiyi CRMember
    edited August 2017

    Hi!
    I had a bad time trying to simulate my app (I am a newbie) but this is the solution: When the emulator opens go to Settings (inside the emulator, like the phone settings), then About emulated device and then tap seven times the Build number section. After that it will show that you are a developer.
    Go to Settings and then Developer options and enable the USB debugging.

  • ShantimohanElchuriShantimohanElchuri USMember ✭✭✭✭✭

    @Piyi said:
    Hi!
    I had a bad time trying to simulate my app (I am a newbie) but this is the solution: When the emulator opens go to Settings (inside the emulator, like the phone settings), then About emulated device and then tap seven times the Build number section. After that it will show that you are a developer.
    Go to Settings and then Developer options and enable the USB debugging.

    It is strange that you have to do this on an emulator. I have never done that on a emulator. But if it resolved your issue, that's it...

  • geliperagelipera MXMember

    @Grazi Thank you very much, your Solution Works like a charm! ;)

  • PrinceTegatonPrinceTegaton USMember ✭✭

    @Grazi thanks

  • @Grazi Tanks a Lot

  • FYI, I had a similar problem on my Mac where I was silently unable to deploy to Android devices or emulators, even outside of Visual Studio for Mac. Inspired by @Grazi's solution, I renamed ~/Library/Developer/Xamarin/android-sdk-macosx and it resolved the issue. I'm assuming this was caused by two conflicting Android SDKs.

  • abdulraufraufiabdulraufraufi PKMember ✭✭

    thanks to GRAZIELLA BONIZI
    this link working for me <3

  • SreeeeSreeee INMember ✭✭✭

    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 am new with xamarin, please help me. Thanks in advance.

  • DeveshMishraDeveshMishra USMember ✭✭

    @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.

    It was like a magic for me. Many thanks for the solution :)

  • NangChunNangChun KRMember

    @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?

    same issue.

    In my case, I just delete all emulator then make one and retry. finally solute.

  • duffthebluffduffthebluff PHMember ✭✭

    @shadisymon it worked for me. thanks!

  • I had the same problem. I followed @Grazi 's solution. I didn't have 'Android' key in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node, so I created myself. I find my Android SDK's path from VS > Tools > Options > Xamarin > Android SDK Location. But it didn't solve the problem.

    I just started the emulator via AVD and then deployed the solution from Build > Deploy Solution. Deployment is successful this way but you still need to start and run the installed app yourself.

  • Sw1maSw1ma USMember

    @VijayPawar.0297 said:
    this might help you.
    [stackoverflow.com/a/32564067/7009636]...

    7 Step answer

    After a fresh installation of VS 2017 Community 15.5.2 on a new laptop, this solution worked for me, thanks!

  • Sw1maSw1ma USMember

    And additionally I needed a permanent fix... that I found at Microsoft's troubleshooting page under section:

    Visual Studio gets stuck trying to deploy the app to the emulator or the emulator does not appear as a debug target in other IDEs

    If the emulator is running, but it does not appear to be connected to ADB (Android Debug Bridge) or it does not appear in Android tools that make use of ADB (for example, Android Studio or Eclipse), you may need to adjust where the emulator looks for ADB. The emulator uses a registry key to identify the base location of your Android SDK, and looks for the \platform-tools\adb.exe file under that directory. To modify the Android SDK path used by the emulator:

    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.

    Restart the emulator and you should now be able to see the emulator connected to ADB and associated Android tools.

    Sorry, i'm not allowed to post links yet.

    Basically what @Grazi posted, but for me the "Android SDK Tools" folder didn't exist. So I created it and added a New String value with Value name: "Path" and Value data: "C:\Program Files (x86)\Android\android-sdk" which matched with the path to my Android SDK folder.

13»
Sign In or Register to comment.