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.
I added the v7 Support GridLayout Library to my project.
When I try to use the GridLayout class I get at runtime the following errors:
* a classnotfoundexception when I instantiate the class in code
* a layoutinflater error when I use the class in xml
I used the correct spelling and casing when I added the class in XML.
The project compiles fine when I instantiate the class in code
I missed the target framework settings as stated here, so this is resolved:
NOTE: Using this support library requires that your app have its Target Android Version (targetSdkVersion) set to Lollipop (5.0 - API Level 21) or higher, or you will have aapt related compile errors. You can still set the Target Framework which your app is compiled against as low as Android 4.0.3 (API Level 15).
sorry - this is not resolved.
I created a blank project added the support library and set the SDK settings as follows in visual studio:
- Compile using android version: API level 19 (also tried with 21)
- Minimum android to target: API level 19
- Target android version: API level 21
the error is the same as stated in the original message
I cannot reproduce this behaviour, so I suspect it may have something to do with a corrupt download of the libraries.
Please try deleting all Android.Support* folders inside of C:\Users\YOUR-USER\AppData\Local\Xamarin
Then delete any obj/ and bin/ folders in your project, restart Visual studio, and try again!
thanks, I did what you suggested.
visual studio showed the following compile error:
> The type or namespace name 'Support' does not exist in the namespace 'Android'
I also tried removing and adding the support libraries again, that didn't help.
I will close this issue as invalid as this is not reproducible for you and I unfortunately don't have time to look further into this.