简体   繁体   中英

xamarin, visual studio 2015 component element is not declared

im new at mobile programming and c#, i had started working in a company as intern, company wanted me to learn xamarin and perform a small side app for their ERP project. Anyway i was going well but i have to make a navigation drawer menu i check examples in net and downloaded source code to see how projects builded but when i try to run my own app and downloaded project i get following error axml file of a project that i have downloaded

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/myDrawer"
    android:layout_width="match_parent"
    android:layout_height="match_parent">
<!-- The main content view -->
    <FrameLayout
        android:id="@+id/content_frame"
        android:layout_width="match_parent"
        android:layout_height="match_parent">
        <TextView
            android:id="@+id/tvText"
            android:text="Hey slide from left or right"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_gravity="center" />
    </FrameLayout>
<!-- The left navigation drawer -->
    <ListView
        android:id="@+id/leftListView"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="left"
        android:choiceMode="singleChoice"
        android:divider="#D2D2D2"
        android:dividerHeight="2dp"
        android:background="#F2F2F2" />
<!-- The right navigation drawer -->
    <ListView
        android:id="@+id/rightListView"
        android:layout_width="240dp"
        android:layout_height="match_parent"
        android:layout_gravity="right"
        android:choiceMode="singleChoice"
        android:divider="#D2D2D2"
        android:dividerHeight="2dp"
        android:background="#F2F2F2" />
</android.support.v4.widget.DrawerLayout>

getting

The 'android.support.v4.widget.DrawerLayout' element is not declared. DrawerLayoutTutorial C:\\Users\\cankut\\Desktop\\Xamarin27Done\\DrawerLayoutTutorial\\DrawerLayoutTutorial\\Resources\\layout\\Main.axml 2

Also when i tried to debug/run program i get following errors

Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r28.zip and extract it to the C:\\Users\\cankut\\AppData\\Local\\Xamarin\\Xamarin.Android.Support.v4\\23.2.1.0\\content directory. DrawerLayoutTutorial C:\\Program Files (x86)\\MSBuild\\Xamarin\\Android\\Xamarin.Android.Common.target

But i have get component android.support.v4, android support designer. i had also try to install components in nuget packages but still no luck, i also check web for my problem but no luck seem my problem far different also my android support repository is uptodate, thanks for your answers.

Hi this is because Xamarin was not able to download the zips compleately

refer to http://duanenewman.net/blog/post/2016/03/16/Xamarin-Build-Errors-Please-Install-Package-XamarinAndroidSupportv4.aspx

als try removing the files at the location and rebuild it would download it for you or manualy download from the url specified and add to zips

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM