Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
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
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.
Steps to reproduce the bug:
1) Download the OpenTK 2.0-0 library from https://github.com/opentk/opentk/releases
2) Compile OpenTK 2.0 using Visual Studio 2015/17.
3) Add OpenTK as a reference (\src\OpenTK\bin\Release\Android\OpenTK.dll) to a C# Android project instead of the default OpenTK.dll (version 0.9.9.3) available in C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\MonoAndroid\v7.0
4) Derive a class from OpenTK.Platform.Android.AndroidGameView in the C# Android project, and try compilation. The following compilation error is reported:
obj\Debug\android\src\md55885a86221361af52222b5e7c9968a43\SampleGLView.java:5: error: package opentk_1_1.platform.android does not exist
Please also refer the link: https://github.com/opentk/opentk/issues/494
The compilation error may be solved by using the above mentioned link, but at runtime the application crashes as the OpenGL render context is not created on the actual Android Marshmallow 6.0 device used for testing. While debugging inside the OnLoad() method of the class derived from AndroidGameView, add 'this' to the Watch Window. The actual class members such as AndroidGameView.ContextRenderingApi that are present in OpenTK 2.0 are not visible, and instead the OpenTK 0.9.9.3 class members such as AndroidGameView.GLContextVersion are instead visible in the Watch window. This means that the older registered version of OpenTK is being used by the Android application instead of OpenTK 2.0.
Hence, I request you to please add support for OpenTK 2.0 in C# Android projects.
Additional reference link: https://bugzilla.xamarin.com/show_bug.cgi?id=18575
Could you please attach sample project which replicates the problem? You might be mixing 2 OpenTK versions?
BTW, the 0.9 version is really old. You might try the OpenTK-1.0 we ship with Xamarin.Android.
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!
I used OpenTK 1.0 that is shipped with Xamarin.Android instead of using OpenTK 2.0. Thanks.