Application get closed after successful deployment in xamarin forms

VishnuPSVishnuPS ✭✭USMember ✭✭

The android version of xamarin forms application get closed after successful deployment.

Build Logs

Copying application to device...
10% ... 7616kb of 76070kb copied
20% ... 15232kb of 76070kb copied
30% ... 22848kb of 76070kb copied
40% ... 30464kb of 76070kb copied
50% ... 38080kb of 76070kb copied
60% ... 45696kb of 76070kb copied
70% ... 53312kb of 76070kb copied
80% ... 60864kb of 76070kb copied
90% ... 68480kb of 76070kb copied
100% ... 76070kb of 76070kb copied
Getting installation path...
Fast dev is disabled, removing fast dev directory: /storage/emulated/0/Android/data/com.aldar.Droid/files/.override
Getting installation path...
Fast dev is disabled, removing fast dev directory: /data/data/com.aldar.Droid/files/.override
Creating "obj\Debug\81\upload.flag" because "AlwaysCreate" was specified.
Done building project "ALDAR.Android.csproj".
Build succeeded.
1>Deployment was successful to oreo.
========== Deploy: 1 succeeded, 0 failed, 0 skipped ==========

~~~~

Xamarin Diagnostics

[D:]: FindVersionFile: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Version, result=True
[I:]: Found Xamarin.Android 9.4.1.1
[I:sdk]: Runtime path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android
[I:sdk]: Framework path: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v1.0
[D:]: ValidateAndroidSdkLocation: C:\Program Files (x86)\Android\android-sdk, result=True
[D:]: ValidateAndroidNdkLocation: , result=False [I:]: Looking for Android NDK... [I:]: Looking for Android SDK... [D:]: ValidateAndroidSdkLocation: `C:\Program Files (x86)\Android\android-sdk`, result=True [D:]: ValidateAndroidSdkLocation: `C:\Program Files (x86)\Android\android-sdk`, result=True [D:]: ValidateJavaSdkLocation: `C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25`, result=True [I:]: Tracking android devices started [D:]: Tracking avd started [D:]: TrackDeviceTask got: 02940117BE001841 device, emulator-5554 device [D:]: avd watcher *.ini path: 'C:\Users\psvis\.android\avd' [I:]: Got new device list from adb with 2 devices [D:]: avd watcher: got device list from avd with 3 devices [D:RunShellCommand]: 02940117BE001841 getprop [D:RunShellCommand]: emulator-5554 getprop [I:]: Looking for Android SDK... [D:]: ValidateAndroidSdkLocation: `C:\Program Files (x86)\Android\android-sdk`, result=True [D:]: ValidateAndroidSdkLocation: `C:\Program Files (x86)\Android\android-sdk`, result=True [D:]: TrackDeviceTask got: emulator-5554 device [I:]: Got new device list from adb with 1 devices [D:RunShellCommand]: emulator-5554 getprop [D:]: ValidateAndroidSdkLocation: `C:\Program Files (x86)\Android\android-sdk`, result=True [D:]: ValidateAndroidNdkLocation:, result=False
[I:]: Looking for Android NDK...
[I:]: Looking for Android SDK...
[D:]: ValidateAndroidSdkLocation: C:\Program Files (x86)\Android\android-sdk, result=True
[D:]: ValidateAndroidSdkLocation: C:\Program Files (x86)\Android\android-sdk, result=True
[D:]: ValidateJavaSdkLocation: C:\Program Files\Android\Jdk\microsoft_dist_openjdk_1.8.0.25, result=True
[D:]: FindVersionFile: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Version, result=True
[I:]: Found Xamarin.Android 9.4.1.1
D:RunShellCommand: emulator-5554 cat /data/system/packages.xml
D:RunShellCommand: emulator-5554 cat /dbdata/system/packages.xml
D:RunShellCommand: emulator-5554 getprop
D:RunShellCommand: emulator-5554 am broadcast -a "mono.android.intent.action.PACKAGE_VERSIONS" -e "packages" "Mono.Android.DebugRuntime,Mono.Android.Platform.ApiLevel_27,com.aldar.Droid" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.PackageVersions"
D:RunShellCommand: emulator-5554 pm uninstall -k "com.aldar.Droid"
D:RunShellCommand: emulator-5554 pm uninstall -k "com.aldar.Droid"
D:RunShellCommand: emulator-5554 pm install -d "/data/local/tmp/com.aldar.Droid-Signed.apk"
D:RunShellCommand: emulator-5554 rm "/data/local/tmp/com.aldar.Droid-Signed.apk"
D:RunShellCommand: emulator-5554 am broadcast -a "mono.android.intent.action.EXTERNAL_STORAGE_DIRECTORY" -n "Mono.Android.DebugRuntime/com.xamarin.mono.android.ExternalStorageDirectory"
D:RunShellCommand: emulator-5554 rm -r -f "/storage/emulated/0/Android/data/com.aldar.Droid/files/.override"
D:RunShellCommand: emulator-5554 rm -r -f "/data/data/com.aldar.Droid/files/.override"
D:RunShellCommand: emulator-5554 am force-stop com.aldar.Droid
D:RunShellCommand: emulator-5554 setprop "debug.mono.connect" ""

Best Answer

Answers

  • gingerdudegingerdude ✭✭ USMember ✭✭

    I'm also having a similar problem but using VS for Mac. iOS works perfectly fine simulator and device, Android emulator works, Android device deploys fine it just won't connect to the debugger.

  • VishnuPSVishnuPS ✭✭ USMember ✭✭
    Accepted Answer

    Repair VS fixed my issue.

Sign In or Register to comment.