Bug 4518 - APIDemo build fails "Cannot implicitly convert type int' toAndroid.Graphics.Color'"
Summary: APIDemo build fails "Cannot implicitly convert type int' toAndroid.Graphics.C...
Status: RESOLVED FIXED
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 4.1.x
Hardware: PC Mac OS
: High normal
Target Milestone: ---
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2012-04-19 09:45 UTC by PJ
Modified: 2012-04-24 10:12 UTC (History)
3 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 FIXED

Description PJ 2012-04-19 09:45:25 UTC
5 errors displayed after build the application.

Steps to reproduce:
1. Open 'API Demo'
2. Build the application.

Actual result:
5 Errors displayed after build the application.

Expected result:
Application should build successfully.

Error trace:
1./Users/nischal/Desktop/xamarin-monodroid-samples-c271ba3/ApiDemo/OS/Sensors.cs(77,77): Error CS0029: Cannot implicitly convert type int' toAndroid.Graphics.Color' (CS0029) (ApiDemo)
2./Users/nischal/Desktop/xamarin-monodroid-samples-c271ba3/ApiDemo/OS/Sensors.cs(77,77): Error CS0029: Cannot implicitly convert type int' toAndroid.Graphics.Color' (CS0029) (ApiDemo)
/Users/nischal/Desktop/xamarin-monodroid-samples-c271ba3/ApiDemo/OS/Sensors.cs(77,77): Error CS0029: Cannot implicitly convert type int' toAndroid.Graphics.Color' (CS0029) (ApiDemo)
/Users/nischal/Desktop/xamarin-monodroid-samples-c271ba3/ApiDemo/OS/Sensors.cs(77,77): Error CS0029: Cannot implicitly convert type int' toAndroid.Graphics.Color' (CS0029) (ApiDemo)
/Users/nischal/Desktop/xamarin-monodroid-samples-c271ba3/ApiDemo/OS/Sensors.cs(77,77): Error CS0029: Cannot implicitly convert type int' toAndroid.Graphics.Color' (CS0029) (ApiDemo)


This issue is happening on at least api level 8 and 10 and on both debug and release

Environment:
mono-android-4.1.1.187784928 (b315ee011dc070f5ac3d654bb3991dd44b1f561d)
MonoDevelop-2.9.5 (f87f5acaa553514dd7f64ad5ae9f7ef8beae2f81)
Mac 10.7.3
Comment 1 PJ 2012-04-19 12:47:17 UTC
Another issue that seems related (please let me know if not):

Notepad.Mono.Data.SQLite sample

1) Run the app
2) Press Sample Note

System.MissingMethodException
https://gist.github.com/2422229
Comment 2 PJ 2012-04-19 13:05:03 UTC
Another one below.

All these ones I'm assuming fall under this conversation:

jonp
the Color change isn't in 4.1.1
jpobst
we don't have a branch for 4.1.1, so master is 4.1.1
jonp
indeed...
jonp
and we're rebooting 4.1.1 now?
eno
maybe pjbeaman tested it with master?
eno
I mean, the one after the color change
jpobst
we have no choice, to test fixes like x86 and such
jonp
right
jonp
we should revert the Color fix then
jonp
since i need to further improve it




Application does not launch successfully as throwing exception'System.MissingMethodException has been thrown'.
Steps to reproduce:
1. Open 'GestureBuilder'.
2. Build the application
3. Run the application
4. Verify application does not launch successfully.
5. System.MissingMethodException has been thrown
Actual result:
Application does not launch successfully throwing exception 'System.MissingMethodException has been thrown'
Expected result:
Application should launch and run successfully.
Stack trace:
System.MissingMethodException: Method not found: 'Android.Content.Res.Resources.GetColor'.
at Android.OS.AsyncTask.n_OnPreExecute (intptr,intptr) [0x00008] in /Users/builder/data/lanes/monodroid-mac-master/d1bff948/source/monodroid/src/Mono.Android/platforms/android-10/src/generated/Android.OS.AsyncTask.cs:304
at (wrapper dynamic-method) object.b13bca40-b21b-4c0c-861f-5f034a39a402 (intptr,intptr) <IL 0x0000c, 0x0002b>
Environment:
mono-android-4.1.1.1.87784928
MonoDevelop-f87f5acaa553514dd7f64ad5ae9f7ef8beae2f81
Mac 10.7.3
Comment 3 Jonathan Pryor 2012-04-24 10:02:33 UTC
The ApiDemo Color breakage should be fixed:

https://github.com/xamarin/monodroid-samples/commit/c409eaf9bc3f101ec43c2567b00014eb6a9437c7

Regarding Notepad-Mono.Data.SQLite and GestureBuilder, are these Debug or Release builds? They both run for me in Debug with Mono for Android 240492ec (4.1.1.37767470).
Comment 4 PJ 2012-04-24 10:12:23 UTC
I think this one just needed to be marked as fixed - we have since tested APIDemo and did not see these issues (but this bug was still NEW). Will re-open if the issue returns.