Mono for Android

Hi,

I am start using Mono for Android. The Resharper shows an error for the following example code:

Task.Factory.StartNew(() => Thread.Sleep(5000)).ContinueWith(task => this.RunOnUiThread(() => this.SomeMethod()));



ReSharper's error message: Cannot resolve method 'RunOnUiThread(lambda expression)', candidates are: ......
The code can be compiled and runs on the Android device. Is it possible to 'tell' ReSharper that this is correct?

Thanks!
5 comments

Hello Andreas,

Could you please attach a small sample solution demonstrating this problem?
Thank you!

Andrey Serebryansky
Senior Support Engineer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hi,

I am start using Mono for Android. The Resharper shows an error for
the following example code:

 => Thread.Sleep(5000)).ContinueWith(task => this.RunOnUiThread(() =>
> this.SomeMethod()));]]>


ReSharper's error message: Cannot resolve method 'RunOnUiThread(lambda
expression)', candidates are: ......

The code can be compiled and runs on the Android device. Is it
possible to 'tell' ReSharper that this is correct?

Thanks!

---
Original message URL:
http://devnet.jetbrains.net/message/5303303#5303303



0

Hi,

the problem is solved after a new start of Visual Studio! :)

0

Hi,

Thanks for the feedback. It is not good behavior. I'll try to reproduce 'resolve' errors on my machine.
If you have any simple demo solution please send it to us for investigation. Thanks in advance!

UPD: I have reproduced this and we will fix that ASAP

http://www.jetbrains.com
"Develop with pleasure!"
0

We have fixed issue with MonoDroid. But, unfortunately the nightly page has the pretty old nightly build (it depends on our dev process). We will try to update it ASAP.
Thank you!

0

Hi,
I now seem to have similar issue.

Resharper gets confused with Task.ContinueWith() when using Mono for Android.

Here is the url to their standard samples:
http://xamarin.com/xamarinmobileapipreview.zip

MainActivity.cs, under MediaPicker sample goes all red in R# (see screenshot), even though it compiles and runs just fine.
I am using R# 6.1.1000.82, VS2010, Mono for Android version is couple of weeks old.

Any help appreciated.

Thanks,
Paul



Attachment(s):
TakePhotoAsync.png
0

Please sign in to leave a comment.