Visual Studio 2015 Xamarin deploy fail without any error message

后端 未结 20 666
隐瞒了意图╮
隐瞒了意图╮ 2020-12-18 17:54

I just installed VS 2015, the installation was finish (after some fail time caused by the slow network, I run setup again).

I create a project as Adroid > A

相关标签:
20条回答
  • 2020-12-18 18:28

    Sometimes the physical Android device gets confused about versions.

    On the device, to go settings | Applications Manager | All applications.

    Manually delete your application. Manually delete "Mono Shared Runtime" (don't worry it will reinstall during deploy)

    Make any change in your project so it is seen as altered and needing to be recompiled: Add a new blank-line to a .cs file or something.

    Build Debug/deploy

    0 讨论(0)
  • 2020-12-18 18:28

    in my case I had this problem because "Solution Configuration" was set to Release. I change it back to Debug and I solve the problem

    0 讨论(0)
  • 2020-12-18 18:30

    In the Android App project Properties in Visual Studio I had to go to Android Options>Advanced and make sure the Support architectures had the architecture of my AVD checked.

    In my case this was x86_64 (which, by the way, does not have a particularly discovereable method of installation - took me days).

    0 讨论(0)
  • 2020-12-18 18:31

    Try one of the following and see if you can get the app to deploy to your device.

    • Clean and build project/solution
    • Make sure you have updated all the NuGet packages (Right click on solution and click on Manage NuGet Packages.... Then check in Updates section whether there are any updates)
    • Make sure you have installed all the necessary SDKs from the Android SDK Manager
    • Check whether you have selected the correct project as the startup
    • Check if you have set the correct path for Android SDK and NDK locations
    • Make sure you have checked Deploy for your selected project from Build -> Configuration Manager
    0 讨论(0)
  • 2020-12-18 18:32

    There is actually a connection between running Visual Studio as administrator and setting the registry path.

    I followed the instructions here but it only worked after running VS as admin because my Android SDK path is in "C:\Program Files (x86)". So in order to add or change files there you need admin rights. Alternatively you can change the permissions of the "Android" folder so that the group "Users" as full access. This worked for me as well.

    Or you make sure you don't even install the Android SDK in "C:\Program Files (x86)".

    By the way I found that restarting VS, or even the Emulator again wasn't necessary after I added the registry key. It picks it up when it needs to.

    0 讨论(0)
  • 2020-12-18 18:34

    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.

    0 讨论(0)
提交回复
热议问题