Reputation: 123
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
Upvotes: 8
Views: 5233
Reputation: 19954
Open Terminal and type the following command:
open ~/.local/share/Xamarin/
Create a 'just in case' folder on your desktop and move all of the content out of the ~/.local/share/Xamarin/ folder.
Rebuild your application.
You'll see a message like this printed to the console:
/Users/{username}/Documents/Development/{path to .Droid project}: Error XA5209: Unzipping failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip and extract it to the /Users/{username}/.local/share/Xamarin/Xamarin.Android.Support.v4/23.3.0.0/content directory. (XA5209)
Download the new .zip file and extract it to:
open ~/.local/share/Xamarin/Xamarin.Android.Support.v4/23.3.0.0/content
You may need to repeat this for other folders.
If you are on PC check out Nigel's answer.
Upvotes: 0
Reputation: 137
First check that the component android.support.design.Library it's installed
In my case I I already had it installed, after, I removed de Component of android.support.design.Library and I installed again and fix it
Upvotes: 0
Reputation: 51
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.
Upvotes: 4
Reputation: 123
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.
Upvotes: 2
Reputation: 361
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
Upvotes: 4