visual studio community for Mac

87 Views Asked by At

When create a new project (Blank Forms App) on visual studio community for Mac. I have encountered errors on the preview, it seems the android setting is incorrect. Please advise how to resolve this problem.

System.NullReferenceException: Object reference not set to an instance of an object
at Xamarin.AndroidDesigner.CodeInteractions.CodeModelBridge.     
<IsActivityType>b__28_0 (Microsoft.CodeAnalysis.AttributeData a) [0x00000] in     
/Users/builder/data/lanes/4693/7553fda2/source/md  addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner.CodeInteractions/CodeModelBridge.cs:361 
 at System.Linq.ImmutableArrayExtensions.Any[T]  (System.Collections.Immutable.ImmutableArray`1[T] immutableArray,  System.Func`2[T,TResult] predicate) [0x00025] in  <36486b016d234fca8cd67892bf29c7b5>:0 
at Xamarin.AndroidDesigner.CodeInteractions.CodeModelBridge.IsActivityType  (Microsoft.CodeAnalysis.INamedTypeSymbol type) [0x00006] in /Users/builder/data/lanes/4693/7553fda2/source/md-addins/MonoDevelop.MonoDroid/Xamarin.AndroidDesigner/Xamarin.AndroidDesigner.CodeI nteractions/CodeModelBridge.cs:361 

update

Download SDK and NKD for command line form google.
Specified location Tools > SDK Manager. It seems java SDK and NDK were located. However, Android SDK cannot be recognised. It seems the Android SDK is invalid, please feel free to comment how to resolve the problem.

1

There are 1 best solutions below

0
On

Installed a Android studio "android-studio-ide-162.3934792-mac". There is a SDK in the home directory $HOME/Library/Android/sdk. Specified location with SDK Manager, problem solved. Thank you.