Issue
Recently i was moved to another project in our team, the project is Xamarin desktop, android, ios application.
I installed these visual studio components:
When I launch the project it gives me 'The type or namespace name 'Android' could not be found' error.
I guess error is related to this problem with Mono.Android:
I tried to google this error, but non of solutions helped me.
One of them was to add a reference to 'Mono.Android.dll' under C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v9
, but as a result i get 'this reference is invalid or unsupported'
I looked at the .csproj file and turns out 'Mono.Android.dll' reference 'Hint Path' was under C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\ReferenceAssemblies\Microsoft\Framework\MonoAndroid\v9
which is the same directory i was adding reference from.
This means the problem is in this file.
I Have no clue how to solve it.
Solution
After install the related components on Visual Studio, you need to setup the Android SDKs.
Follow the steps in the link below about the Android SDK. https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-sdk?tabs=windows
And then setup Android Emulator. https://docs.microsoft.com/en-us/xamarin/android/get-started/installation/android-emulator/
Answered By - Wendy Zang - MSFT
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.