简体   繁体   中英

Namespace of Android, Xamarin and XamarinForms not found

I cloned a Xamarin.Forms project from GitHub and opened it in Visual Studio. There I get 194 errors, because of namespace/usings that are not found. These usings are red underlined (all except "using System"):

  • using Foundation
  • using UIKit
  • using Android
  • using Windows
  • using Xamarin

The project should work because my team member who pushed it to git can build it on his pc. I'm very new in Xamarin.Forms and Visual Studio, so please write a detailed answer. :) Should I install these namespaces, or why doesn't Visual Studio recognize them?

Step1: Close VisualStudio

Step2: Go to these root folders:

Mac:

Mac: ~/.local/share/Xamarin/   
Mac: ~/.local/share/Xamarin.Android/

Windows:

C:\Users\Me\AppData\Local\Xamarin\
C:\Users\Me\AppData\Local\Xamarin.Android\

Delete all the files there. And also clear Temp Folders from you machine

Step3: Go to your project in Visual Studio and close all the tabs from Windows -> Close All Tabs and then click on Build -> Clean Solution and then click on Build -> Rebuild Solution.

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