Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Xamarin Forms Android Problems, package android.support.design.* does not exist

I have a Xamarin.Forms Project in which i can not get Android to build, as a matter of fact even a brand new project i have the same problems Android fails out with tons and tons of errors. I have installed and reinstalled Android SDK, Java, and made sure all thats in the Android SDK is installed, still no go.

Severity    Code    Description Project File    Line    Suppression State
Error       error: package android.support.design.widget.TabLayout does not exist
        android.support.design.widget.TabLayout.OnTabSelectedListener,  MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\md5270abb39e60627f0f200893b490a1ade\TabbedPageRenderer.java   8   
Error       error: package android.support.design.widget.TabLayout does not exist
    public void onTabReselected (android.support.design.widget.TabLayout.Tab p0)    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\md5270abb39e60627f0f200893b490a1ade\TabbedPageRenderer.java   76  
Error       error: package android.support.design.widget.TabLayout does not exist
    private native void n_onTabReselected (android.support.design.widget.TabLayout.Tab p0); MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\md5270abb39e60627f0f200893b490a1ade\TabbedPageRenderer.java   81  
Error       error: package android.support.design.widget.TabLayout does not exist
    public void onTabSelected (android.support.design.widget.TabLayout.Tab p0)  MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\md5270abb39e60627f0f200893b490a1ade\TabbedPageRenderer.java   84  
Error       error: package android.support.design.widget.TabLayout does not exist
    private native void n_onTabSelected (android.support.design.widget.TabLayout.Tab p0);   MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\md5270abb39e60627f0f200893b490a1ade\TabbedPageRenderer.java   89  
Error       error: package android.support.design.widget.TabLayout does not exist
    public void onTabUnselected (android.support.design.widget.TabLayout.Tab p0)    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\md5270abb39e60627f0f200893b490a1ade\TabbedPageRenderer.java   92  
Error       error: package android.support.design.widget.TabLayout does not exist
    private native void n_onTabUnselected (android.support.design.widget.TabLayout.Tab p0); MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\md5270abb39e60627f0f200893b490a1ade\TabbedPageRenderer.java   97  
Error       error: package android.support.design.widget.AppBarLayout does not exist
        android.support.design.widget.AppBarLayout.OnOffsetChangedListener  MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\AppBarLayout_OnOffsetChangedListenerImplementor.java   8   
Error       error: cannot find symbol
    public void onOffsetChanged (android.support.design.widget.AppBarLayout p0, int p1)
  symbol:   class AppBarLayout
  location: package android.support.design.widget   MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\AppBarLayout_OnOffsetChangedListenerImplementor.java   27  
Error       error: cannot find symbol
    private native void n_onOffsetChanged (android.support.design.widget.AppBarLayout p0, int p1);
  symbol:   class AppBarLayout
  location: package android.support.design.widget   MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\AppBarLayout_OnOffsetChangedListenerImplementor.java   32  
Error       error: package android.support.design.widget.NavigationView does not exist
        android.support.design.widget.NavigationView.OnNavigationItemSelectedListener   MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\NavigationView_OnNavigationItemSelectedListenerImplementor.java    8   
Error       error: package android.support.design.widget.SwipeDismissBehavior does not exist
        android.support.design.widget.SwipeDismissBehavior.OnDismissListener    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\SwipeDismissBehavior_OnDismissListenerImplementor.java 8   
Error       error: package android.support.design.widget.TabLayout does not exist
        android.support.design.widget.TabLayout.OnTabSelectedListener   MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\TabLayout_OnTabSelectedListenerImplementor.java    8   
Error       error: package android.support.design.widget.TabLayout does not exist
    public void onTabReselected (android.support.design.widget.TabLayout.Tab p0)    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\TabLayout_OnTabSelectedListenerImplementor.java    29  
Error       error: package android.support.design.widget.TabLayout does not exist
    private native void n_onTabReselected (android.support.design.widget.TabLayout.Tab p0); MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\TabLayout_OnTabSelectedListenerImplementor.java    34  
Error       error: package android.support.design.widget.TabLayout does not exist
    public void onTabSelected (android.support.design.widget.TabLayout.Tab p0)  MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\TabLayout_OnTabSelectedListenerImplementor.java    37  
Error       error: package android.support.design.widget.TabLayout does not exist
    private native void n_onTabSelected (android.support.design.widget.TabLayout.Tab p0);   MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\TabLayout_OnTabSelectedListenerImplementor.java    42  
Error       error: package android.support.design.widget.TabLayout does not exist
    public void onTabUnselected (android.support.design.widget.TabLayout.Tab p0)    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\TabLayout_OnTabSelectedListenerImplementor.java    45  
Error       error: package android.support.design.widget.TabLayout does not exist
    private native void n_onTabUnselected (android.support.design.widget.TabLayout.Tab p0); MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp.Droid\obj\Debug\android\src\mono\android\support\design\widget\TabLayout_OnTabSelectedListenerImplementor.java    50  
Warning CS0108  'App.Current' hides inherited member 'Application.Current'. Use the new keyword if hiding was intended. MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\App.cs    9   
Warning CS0108  'LoginPage.IsBusy' hides inherited member 'Page.IsBusy'. Use the new keyword if hiding was intended.    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\LoginPage.xaml.cs 53  
Warning CS4014  Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\LoginPage.xaml.cs 105 
Warning CS4014  Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\LoginPage.xaml.cs 112 
Warning CS0649  Field 'LoginServerResponseModel.Login' is never assigned to, and will always have its default value null    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Models\LoginServerResponseModel.cs    8   
Warning CS0649  Field 'RegistrationServerResponseModel.registration' is never assigned to, and will always have its default value null  MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Models\RegistrationServerResponseModel.cs 8   
Warning CS4014  Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\SignupPage.xaml.cs    99  
Warning CS4014  Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\SignupPage.xaml.cs    150 
Warning CS4014  Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\SignupPage.xaml.cs    157 
Warning CS0414  The field 'UploadImagePage.imgcount' is assigned but its value is never used    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\UploadImagePage.xaml.cs   10  
Warning CS0414  The field 'UploadImagePage.userfolder' is assigned but its value is never used  MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\UploadImagePage.xaml.cs   11  
Warning CS4014  Because this call is not awaited, execution of the current method continues before the call is completed. Consider applying the 'await' operator to the result of the call. MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\UploadImagePage.xaml.cs   56  
Warning     @(Content) build action is not supported    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Images\background.png     
Warning     @(Content) build action is not supported    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Images\check_active.png       
Warning     @(Content) build action is not supported    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Images\check_inactive.png     
Warning     @(Content) build action is not supported    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Images\icon_easyrest.png      
Warning     @(Content) build action is not supported    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Images\ic_launcher.png        
Warning     @(Content) build action is not supported    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Images\logout.png     
Warning     @(Content) build action is not supported    MyApp.Droid P:\VisualStudioProjects\MyApp\MyApp\MyApp\Images\pdf_icon.png   
like image 409
Adam Bennett Avatar asked Mar 26 '16 09:03

Adam Bennett


3 Answers

Try backing up and removing anything under C:\Users\UserName\AppData\Local\Xamarin\Android.Support.Design\23.0.1.3 (or similar version number), then building the project. Check the output window and you should see a link to a zip file and where to unzip it.

You may have to do this for other folders too, such as Android.Support.v7.AppCompat

like image 119
Nigel Ferrissey Avatar answered Oct 15 '22 22:10

Nigel Ferrissey


the way I fixed this error was deleting the obj and bin folders from the app project folder and rebuilding it again. Worked for me.

like image 26
Muzzi Avatar answered Oct 15 '22 21:10

Muzzi


After a lot of tinkering around I finally got this fixed and heres what I did, I updated Xamarin to the newest version while simultaneously Updating VS 2015 to update 2, after all that was done and before starting VS I deleted all the User/username/AppData/Xamarin/Android.Support.* folders and then opened VS 2015 and created a brand new Xamarin Forms Shared Project Solution and viola it copied over all the needed files and Android compiles.

like image 29
Adam Bennett Avatar answered Oct 15 '22 22:10

Adam Bennett