Forum Visual Studio

Announcement:

The Xamarin Forums have officially moved to the new Microsoft Q&A experience. Microsoft Q&A is the home for technical questions and answers at across all products at Microsoft now including Xamarin!

To create new threads and ask questions head over to Microsoft Q&A for .NET and get involved today.

The type or namespace name 'Android' could not be found

Hello,

I am facing the following issue when running "build all".

"The type or namespace name 'Android' could not be found(are you missing a using directive or an assembly reference?)"

I just installed and then rebooted my machine via the Xamarin Studio Installer.
I am following the guide https://developer.xamarin.com/guides/xamarin-forms/getting-started/hello-xamarin-forms/quickstart/
The error is on class PhoneDialer.cs from the above guide.

OS: Windows 10 Professional
Xamarin Version: 5.10.3

I searched for this error and found a couple of forum posts without an answer. In one post the issue was resolved by recreating the class. I re-created the class but am still facing the issue.

I am a student and using Xamarin for the first time. Installation of Xamarin and the other components that it install were successful. Any help is appreciated.

Thank you,
Regards,

Posts

  • kentuckerkentucker USMember ✭✭✭✭✭

    I think you need to change

    using Android.Content;
    using Android.Telephony;

    to

    using Xamarin.Android.Content;
    using Xamarin.Android.Telephony;

  • renancoelhosilvarenancoelhosilva USMember
    edited March 2016

    Thank you for the reply!

    I am in the process of reinstalling the whole setup. I will update the forum if I face the issue again after install and informing if the suggestion worked. If so they probably should update the tutorial as well.

    Thanks again!

  • Hi,

    same issue for me as well. I am trying to build Xamarin.ios project in visual studio for Mac 2019. But I am getting this error when I build the project.

    When I debug the issue it points to the following line. using Android.OS; in one of the xaml.cs file

    Any help would be appreciated.

Sign In or Register to comment.