Bug 23951 - Build fails on PC (but not Mac) with "Cannot convert lambda expression to type 'Java.Lang.IRunnable' because it is not a delegate type"
Summary: Build fails on PC (but not Mac) with "Cannot convert lambda expression to typ...
Status: CONFIRMED
Alias: None
Product: Android
Classification: Xamarin
Component: General (show other bugs)
Version: 4.16.0
Hardware: PC Windows
: Normal normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2014-10-20 19:01 UTC by Kent Green [MSFT]
Modified: 2014-10-21 11:25 UTC (History)
3 users (show)

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


Attachments
Logs from PC reproducing error. (18.32 KB, application/zip)
2014-10-20 19:01 UTC, Kent Green [MSFT]
Details

Description Kent Green [MSFT] 2014-10-20 19:01:16 UTC
Created attachment 8457 [details]
Logs from PC reproducing error.

---Overview---
From this desk case:
https://xamarin.desk.com/agent/case/90710

With the latest update it's still only building on the Mac but not the PC but the error is:
>"Cannot convert lambda expression to type 'Java.Lang.IRunnable' because it is not a delegate type" 
AND
>"Only assignment, call, increment, decrement, await, and new object expressions can be used as a statement"
(each repeating 11 times. 

Meanwhile the same code can build fine on Mac; though with warnings. 

---Steps to reproduce---
Open & build sample project on Mac, it works in Xamarin Studio.
Open & build sample project on PC, it fails in both Visual Studio & Xamarin Studio.


=== Xamarin Studio ===

Version 5.5.2 (build 0)
Installation UUID: fdb745f8-bf48-44c4-9fc2-33f6ae172adf
Runtime:
	Microsoft .NET 4.0.30319.34014
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.18.0 (Business Edition)
Android SDK: C:\Users\kentgreen\AppData\Local\Android\android-sdk
	Supported Android versions:
		2.3   (API level 10)
		3.1   (API level 12)
		4.0.3 (API level 15)
		4.4   (API level 19)
Java SDK: C:\Program Files (x86)\Java\jdk1.6.0_39
Java version check failed: The directory name is invalid

=== Build Information ===

Release ID: 505020000
Git revision: a5887be38215a6cdd3f349e102ef82a1c4f950a4
Build date: 2014-10-14 12:21:34-04
Xamarin addins: 069ddd29bb70a42238142eee9bac21a5e4b2f9f9

=== Operating System ===

Windows 6.2.9200.0 (64-bit)


---Additional info---
Originally, the issue was that it wasn't able to build on the PC but could on the Mac due to a reference error, but while I was testing and updated that issue seems to have changed / disappeared. 

I'm also not 100% sure that this is caused by Xamarin.Android as opposed to something else, but it was my best guess, please recategorize if needed. 

(Test project coming soon as private attachment)
Comment 2 Udham Singh 2014-10-21 01:02:34 UTC
I have checked this issue and observed the same behaviour mentioned in bug description.

Screencast : http://www.screencast.com/t/PbGAiOdc

Environment Info :

=== Xamarin Studio ===

Version 5.5.2 (build 0)
Installation UUID: 3235da96-1cb2-43d5-a836-234fd96911c2
Runtime:
	Microsoft .NET 4.0.30319.18449
	GTK+ 2.24.22 (MS-Windows theme)
	GTK# 2.12.26

=== Xamarin.Android ===

Version: 4.18.0 (Enterprise Edition)
Android SDK: D:\Backup_OldMachine\D Drive\SDK\android-sdk
	Supported Android versions:
		1.6    (API level 4)
		2.1    (API level 7)
		2.2    (API level 8)
		2.3    (API level 10)
		3.0    (API level 11)
		3.1    (API level 12)
		3.2    (API level 13)
		4.0    (API level 14)
		4.0.3  (API level 15)
		4.1    (API level 16)
		4.2    (API level 17)
		4.3    (API level 18)
		4.4    (API level 19)
		4.4.87 (API level 20)
		4.5    (API level 21)
Java SDK: C:\Program Files\Java\jdk1.7.0_67
java version "1.7.0_67"
Java(TM) SE Runtime Environment (build 1.7.0_67-b01)
Java HotSpot(TM) 64-Bit Server VM (build 24.65-b04, mixed mode)

=== Build Information ===

Release ID: 505020000
Git revision: a5887be38215a6cdd3f349e102ef82a1c4f950a4
Build date: 2014-10-14 12:21:34-04
Xamarin addins: 069ddd29bb70a42238142eee9bac21a5e4b2f9f9

=== Operating System ===

Windows 6.2.9200.0 (64-bit)

Note You need to log in before you can comment on or make changes to this bug.