XMLNS:Android Schema Out of Date? Not Declared?

VetoVeto ✭✭USMember ✭✭
edited September 2016 in Xamarin.Android

Hi Xamarin group,
I am pretty new to developing in Xamarin VS2015, but I've been making some good progress (at least I think). I am trying to customize the layout of my Xamarin.Android app, and it seems like some of the suggested xmlns:android attributes, even on the intro to Xamarin.Android guide, are underlined in green and set to 'attribute is not declared'. I am currently targeting API version 21 (5.0 Lollipop), but it makes no difference.

For example, android:divider, and android:showDividers should exist for API 11+, but debugging says otherwise. In cases where android:elevation is defined, it shows up as not declared as well, but the dropshadow effect is rendered when deploying the program.

I looked in my XML schema and it shows that I am currently using 4.1.2.18, and I have the xmlns:android="http://schemas.android.com/apk/res/android" schema defined, but to no avail.

As another example, with code, if I create a new template and follow along here: https://developer.xamarin.com/guides/android/user_interface/cardview/, the same issue. I've added the components for the CardView, RecycleView, and Support v7 Library to my project, but still the schema tells me nothing is declared. Or it will tell me that my CardView has an invalid child element (expecting a TextView/ImageView, which is all that is there).

Any help on this matter would be appreciated as it makes it seem like my application is debugging for APIv1.0

Thank you!!

Answers

  • VetoVeto ✭✭ USMember ✭✭

    Here is a picture to help...

  • Have you found the solution to this problem? I am having the same issue

  • VetoVeto ✭✭ USMember ✭✭

    No, I did not get an answer from any documentation or support forum, so I ended up switching over to Android Studio and am now programming in Java. My code works just fine there.

    One flag that was raised in AS is that the v7 support plugin needs to match the build SDK version. This is not easily specified in VS15, and every update Google makes puts Xamarin a step behind, so it is very discerning as a programmer to continue backing this team.

  • Good to know. I would switch to Java if I didn't have to support iOS. I will play with the SDK version to try to solve the problem, if it doesn't work I'll just take another approach for the xml file

  • ArturoRodriguezArturoRodriguez ✭✭ USMember ✭✭

    @Veto said:
    No, I did not get an answer from any documentation or support forum, so I ended up switching over to Android Studio and am now programming in Java. My code works just fine there.

    One flag that was raised in AS is that the v7 support plugin needs to match the build SDK version. This is not easily specified in VS15, and every update Google makes puts Xamarin a step behind, so it is very discerning as a programmer to continue backing this team.

    The problem still persists and I think that I'll switch over to Android Studio too, if it's not solved.

  • AtulVasudevAtulVasudev USMember

    Started a new project in Xamarin.Android in VS2015, Got the same Warnings and I ended up here :(

  • Sai.9321Sai.9321 USMember

    I am also suffering similar issue
    can any1 suggest soln for the problem
    For some it works but for some attribute it doesnt.

  • VetoVeto ✭✭ USMember ✭✭

    Nah, I posted this question to the developers, moderators, and veterans of the Xamarin community over 4 months ago, and they still haven't even had the courtesy of responding or addressing this issue directly. Since it completely prevents you from using the App.Compat framework for custom Android development with .NET, it seems to me like there is no answer. If you aren't using Xamarin Forms, then use Android Studio to develop and maintain your code. It is just disappointing because C# is a much cleaner declarative programming language compared to the mess that is Java.

  • JeremyKolbJeremyKolb ✭✭✭ USMember ✭✭✭

    Guys, they don't read the forums. Please file a bug at bugzilla.xamarin.com.

  • BrandonJakeTorresBrandonJakeTorres USMember
    edited March 2017

    ugh

  • JamshaidKamranJamshaidKamran ✭✭ PKMember ✭✭

    Same issue here, It is forcing me to learn java and swift/object-c :|

  • mega5800mega5800 ✭✭ USMember ✭✭

    hello,

    i had similar issue with my xml files in my projects.
    the link below should help
    https://stackoverflow.com/questions/37055702/the-attribute-is-not-declared-android-on-basic-xml-attributes/39780611

Sign In or Register to comment.