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

后端 未结 15 1668
鱼传尺愫
鱼传尺愫 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 09:03

    I experienced this problem when there was not sufficient memory on device. After "successful" deployment the app was missing even from the app list in Settings. Deleting through adb gave me Failure which indicated it was not installed. In Output log in VS2015 I was having the same message as OP. Finally it worked after I cleaned up about 50-100 MB, even though in App Settings it showed me that there were 500 MB free. I tried different solutions (deleting through adb, cleaning, building then deploying) but only cleaning up worked.

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

    The only alternatives which help me solve this were the following:

    • From the Xamarin Android Studio home page (where all devices are displayed), click on the "three-dots" button and then Factory Reset.

    OR

    • Install a new device and deploy your app there.
    0 讨论(0)
  • 2020-12-09 09:05

    If you've reinstalled everything you may have to set the configuration manager back up in VS.

    In Visual Studio: Build -> Configuration Manager -> Put a check in the "Deploy" box.

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

    Renaming Application Name and Package Name (go to Manifest settings) where helped to resolve this issue

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

    I solved the issue. Somehow the application still existed on my device even though it did not show up in my applications and I needed to remove it.

    The solution was to find an old APK that I had emailed and I installed that. Then I uninstalled the application and deployed it again from Visual Studio. This time it worked.

    You can read more here: https://forums.xamarin.com/discussion/8501/install-failed-update-incompatible

    EDIT (March 13th, 2017):

    Seems a lot of people found this answer useful so I decided I should update it with an alternate method to uninstall the app if you don't have access to an old version.

    As Atul Chaudhary and Nestel mentioned, you can open up your adb command prompt and run adb uninstall <com.your.application.package.name>. If there are any remnants of your application which remain this should get rid of them.

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

    In my case issue was two activities were Launcher activities,so I made one of them Launcher activity.

    You can remove <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> </intent-filter> from AndroidManifest.xml file or MainLauncher = true from .cs Activity file attribute

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