Xamarin - Android - Visual Studio - The application could not be started

后端 未结 15 1666
鱼传尺愫
鱼传尺愫 2020-12-09 08:25

I was working on an Android project using Xamarin in Visual Studio 2012. I recently upgraded from an HDD to a SSD so I reinstalled Windows and all of my programs.

Af

相关标签:
15条回答
  • 2020-12-09 08:52

    Whenever I encounter this problem, I publish the app and install in manually using

    adb install "<path to apk file>"

    in the Android Adb Command Prompt.

    Hopefully, a fix is out soon, according to https://github.com/xamarin/xamarin-android/issues/3727

    0 讨论(0)
  • 2020-12-09 08:54

    1. Renamed Application name.

    2. Added Package name.

    App. started working on Emulator, Renamed application again, app. continued to run.

    Note: Resetting device, un-installing the app. and related runtime etc. from settings did not work for me.

    Hope this helps someone.

    0 讨论(0)
  • 2020-12-09 08:54

    Running this command from the adb shell solved it for me:

    adb shell pm uninstall -k com.packagename
    

    To access the adb shell from Visual Studio Tools -> Android -> Android Adb Command Prompt.

    Very interesting error, seems like Visual Studio is unable to unistall the previous version completely.

    0 讨论(0)
  • 2020-12-09 09:00

    Obviously the OP figured out the issue to their problem but I still wanted to post an answer relating to an issue I had with the same error message. I am using Visual Studio (within Parallels) and attempting to debug the app on a Xamarin Android Player instance (which is running on my Mac).

    I kept getting this error and realized that a different, more helpful, error message was showing up in the Build Output saying that I was not supporting the correct architecture.

    Heading into the Android Project Properties -> Android Options -> Advanced -> and checking x86 finally allowed my to successfully deploy to the Xamarin Android Player.

    0 讨论(0)
  • 2020-12-09 09:02

    The ADB approach does not worked for me. I did not want to factory reset my phone nor uninstall my apps so I have managed to deploy by changing the package.

    1. Right click on your Droid project
    2. Select Properties
    3. Got to Application Manifest
    4. Change the Package name
    5. Re-deploy your project

    Hope this helps

    0 讨论(0)
  • 2020-12-09 09:02

    I've managed to solve it by wiping user data from emulator.

    From AVD Manager, when you start the emulator, check "Wipe user data" and your emulated device will behave like new.

    Problem itself appeared after updating to Android SDK Tools 25.1.3.

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