Bug 39964 - Cannot deploy to Android N device or AVD
Summary: Cannot deploy to Android N device or AVD
Status: RESOLVED INVALID
Alias: None
Product: Android
Classification: Xamarin
Component: Tools and Addins ()
Version: 6.0.0
Hardware: Macintosh Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2016-03-29 10:23 UTC by Tomasz Cielecki
Modified: 2016-03-30 11:54 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Tomasz Cielecki 2016-03-29 10:23:25 UTC
Was going to investigate what to do about behaviour changes on Android N in regards to using built in .so files. However, I can't seem to deploy any app through Xamarin.Studio.

Running latest Alpha:

Xamarin.Android
Version: 6.1.0.16 (Enterprise Edition)
Android SDK: /Users/tomasz/Library/Developer/Xamarin/android-sdk-macosx
	Supported Android versions:
		4.0.3 (API level 15)
		4.4   (API level 19)
		5.0   (API level 21)
		6.0   (API level 23)

SDK Tools Version: 24.4.1
SDK Platform Tools Version: 23.1
SDK Build Tools Version: 22.0.1

Xamarin Studio
Version 6.0 (build 4801)
Installation UUID: f7448b1c-a576-4e9a-8ecf-326f70c23e82
Runtime:
	Mono 4.4.0 (mono-4.4.0-branch/f8474c4) (64-bit)
	GTK+ 2.24.23 (Raleigh theme)

	Package version: 404000040


Project builds fine, but when deploying I get these two InternalErrors:

When deploying to AVD: Deployment failed because of an internal error: missing , in ID_SEND
When deploying to device (Nexus 6P): Deployment failed because of an internal error: EndRead failure

Looking at the Xamarin Studio log I get:


[2016-03-29 12:16:05.4] DEBUG: RunShellCommand: emulator-5554 am broadcast -a "mono.android.intent.action.PACKAGE_VERSIONS" -e "packages" "Mono.Android.DebugRuntime,Mono.Android.Platform.ApiLevel_23,com.companyname.sqliteshizzle" "Mono.Android.DebugRuntime/com.xamarin.mono.android.PackageVersions"
[2016-03-29 12:16:05.8] DEBUG: RunShellCommand: emulator-5554 cat /data/system/packages.xml
[2016-03-29 12:16:05.8] DEBUG: RunShellCommand: emulator-5554 cat /dbdata/system/packages.xml
[2016-03-29 12:16:05.8] DEBUG: RunShellCommand: emulator-5554 pm uninstall "Mono.Android.DebugRuntime"
[2016-03-29 12:16:05.8] DEBUG: RunShellCommand: emulator-5554 pm uninstall "Mono.Android.DebugRuntime"
[2016-03-29 12:16:06.5] DEBUG: RunShellCommand: emulator-5554 rm "/data/local/tmp/Mono.Android.DebugRuntime-x86.apk"
[2016-03-29 12:16:06.6] WARNING: Failed to delete package file: {0}: One or more errors occurred.
[2016-03-29 12:16:06.6] ERROR: Deployment failed
Mono.AndroidTools.AdbException: missing , in ID_SEND
  at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError (CancellationToken token) [0x00029] in /Users/builder/data/lanes/2920/f73f730c/source/md-addins/MonoDevelop.MonoDroid/external/androidtools/Mono.AndroidTools/Util/AggregateAsyncResult.cs:70 
  at Mono.AndroidTools.Adb.AdbSyncClient.EndPush (IAsyncResult result) [0x00007] in /Users/builder/data/lanes/2920/f73f730c/source/md-addins/MonoDevelop.MonoDroid/external/androidtools/Mono.AndroidTools/Adb/AdbSyncClient.cs:770 
  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (IAsyncResult iar, System.Func`2 endFunction, System.Action`1 endAction, System.Threading.Tasks.Task`1 promise, Boolean requiresSynchronization) [0x00014] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550
Comment 1 Tomasz Cielecki 2016-03-29 10:32:07 UTC
Here is the log for when deploying to device:


WARNING [2016-03-29 12:27:34Z]: ANDROID: Failed to delete package file: {0}: One or more errors occurred.
ERROR [2016-03-29 12:27:34Z]: ANDROID: Deployment failed
Mono.AndroidTools.AdbException: Unable to read data from the transport connection: Connection reset by peer. ---> System.IO.IOException: Unable to read data from the transport connection: Connection reset by peer. ---> System.Net.Sockets.SocketException: Connection reset by peer
  at System.Net.Sockets.Socket.EndReceive (IAsyncResult result) [0x0002d] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/mcs/class/System/System.Net.Sockets/Socket.cs:2012 
  at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult asyncResult) [0x0005f] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/System/net/System/Net/Sockets/NetworkStream.cs:858 
  --- End of inner exception stack trace ---
  at System.Net.Sockets.NetworkStream.EndRead (IAsyncResult asyncResult) [0x00092] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/System/net/System/Net/Sockets/NetworkStream.cs:870 
  at Mono.AndroidTools.Util.ReadFullAsyncResult.EndRead (IAsyncResult ar) [0x00000] in /Users/builder/data/lanes/2920/f73f730c/source/md-addins/MonoDevelop.MonoDroid/external/androidtools/Mono.AndroidTools/Util/StreamExtensions.cs:91 
  at Mono.AndroidTools.Adb.AdbSyncClient.ReadFailMessage_OnRead (IAsyncResult ar) [0x0000c] in /Users/builder/data/lanes/2920/f73f730c/source/md-addins/MonoDevelop.MonoDroid/external/androidtools/Mono.AndroidTools/Adb/AdbSyncClient.cs:1676 
  --- End of inner exception stack trace ---
  at Mono.AndroidTools.Util.AggregateAsyncResult.CheckError (CancellationToken token) [0x00029] in /Users/builder/data/lanes/2920/f73f730c/source/md-addins/MonoDevelop.MonoDroid/external/androidtools/Mono.AndroidTools/Util/AggregateAsyncResult.cs:70 
  at Mono.AndroidTools.Adb.AdbSyncClient.EndPush (IAsyncResult result) [0x00007] in /Users/builder/data/lanes/2920/f73f730c/source/md-addins/MonoDevelop.MonoDroid/external/androidtools/Mono.AndroidTools/Adb/AdbSyncClient.cs:770 
  at System.Threading.Tasks.TaskFactory`1[TResult].FromAsyncCoreLogic (IAsyncResult iar, System.Func`2 endFunction, System.Action`1 endAction, System.Threading.Tasks.Task`1 promise, Boolean requiresSynchronization) [0x00014] in /private/tmp/source-mono-4.4.0/bockbuild-mono-4.4.0-branch/profiles/mono-mac-xamarin/build-root/mono-x86/external/referencesource/mscorlib/system/threading/Tasks/FutureFactory.cs:550
Comment 2 Tomasz Cielecki 2016-03-30 10:41:05 UTC
Same situation through VS.
Comment 3 Adam Hartley [MSFT] 2016-03-30 11:54:53 UTC
At this time we do not have support for the Android N preview from Google, but we are working towards releasing an initial preview version of Xamarin.Android as soon as possible.

Technical bulletin: https://releases.xamarin.com/technical-bulletin-android-n/