none
The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' RRS feed

  • Question

  • Hi guys.
    I Updated my nuget packages few days ago to new versions.
    but my Android project has 2 errors in MainActivity.cs:
    1:
    The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform' (are you missing an assembly reference?) Sama.SamaApp.Android MainActivity.cs

    2:
    'MainActivity.OnCreate(Bundle)': no suitable method found to override MainActivity.cs

    i search it in google and find solutions.

    But i tested all solutions in two up links but not worked for me.
    i tested clear nuget and dotnet caches . removing bin & obj folders . restore nuget packages . remove and reinstall Xamarin.Forms .finally clean rebuilding the solution.
    But I could not fix it.
    thanks...

    Sunday, February 17, 2019 6:37 AM

All replies

  • You have a compile error show the code where the compile error is showing. The error message means your code has a reference to an object in the namespace, but the project has no reference to a DLL that has the namespace.

    Sunday, February 17, 2019 3:22 PM
  • Hi Roli Moli,

    Thank you for posting here.

    For your question, you could post a new thread in Xamarin forum for suitable support.

    The CLR Forum discuss and ask questions about .NET Framework Base Classes (BCL) such as Collections, I/O, Regigistry, Globalization, Reflection. Also discuss all the other Microsoft libraries that are built on or extend the .NET Framework, including Managed Extensibility Framework (MEF), Charting Controls, CardSpace, Windows Identity Foundation (WIF), Point of Sale (POS), Transactions.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, February 18, 2019 3:07 AM
    Moderator
  • Hi DA924x.

    the Error occured in MainActivity.cs:

    [public class MainActivity : global::Xamarin.Forms.Platform.Android.FormsAppCompatActivity]

    The Error message :The type or namespace name 'Android' does not exist in the namespace 'Xamarin.Forms.Platform'

    there are Xamarin.Forms 3.5.0 nuget package reference in all projects.

    if Xamarin.Forms.Platform is another package i searched it and not found in Nuget Packages .

    this image show mt android project references:



    • Edited by Roli Moli Monday, February 18, 2019 5:03 AM
    Monday, February 18, 2019 4:51 AM
  • thank you Wendy Zang (MSFT CSG).

    i searched it first but could not find it in msdn.

    i posted it already:

    https://forums.xamarin.com/discussion/150321/the-type-or-namespace-name-android-does-not-exist-in-the-namespace-xamarin-forms-platform

    but no answered yet.
    • Edited by Roli Moli Monday, February 18, 2019 5:04 AM
    Monday, February 18, 2019 5:00 AM
  • Hi.
    finally i downgrade my Xamarin.Forms from version 3.5 to 3.4 . and errors gone. 

    thanks for your questions.


    Tuesday, February 19, 2019 4:41 AM
  • Hi Roli Moli,

    Thanks for your sharing.

    If your question has been solved, please mark the useful reply as answer to close the thread. This will make answer searching easier in the forum and be beneficial to community members.

    Best Regards,

    Wendy


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Proposed as answer by Daniel Ibanga Saturday, June 8, 2019 11:56 AM
    • Unproposed as answer by Daniel Ibanga Saturday, June 8, 2019 11:56 AM
    Tuesday, February 19, 2019 8:06 AM
    Moderator
  • Answered. thanks\

    Saturday, June 8, 2019 11:57 AM
  • You're correct  Roli. I just upgraded my nuget package Xamarin forms to the stable version and errors cleared of immediately..
    Saturday, June 8, 2019 11:58 AM