Unable to connect Xamarin Profiler to the Device

kakeskakes USMember ✭✭

I am pulling my hairs over this for the last two days. Whatever I do, I can't get the Xamarin Profiler to work with any of the virtual or real physical device.

I installed VS 2015 15.6.2 Enterprise, Installed the Android SDK Tools 26.1.1 required by the new Xamarin Android SDK/Emulator Manager, ensured that I have Android SDK Build Tools 26.0.3 and also 27.0.3, uninstalled and reinstalled VS 201& 15.6.2 multiple times but can't get the Profiler to working for Android.

Each time I run the profiler, I get the error "Sorry, something went wrong trying to run com.companyname.App7: Device 21bc93f1 not found".

It is a very simple one page basic application created right out of Xamarin Cross Platform Template.

Below is the info from the log file

XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:17.9898] ##########################################
XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:17.9908] # Xamarin Profiler version - 1.6.2.127
XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:17.9918] # * Arch x86_64
XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:17.9918] ##########################################
XamarinProfiler.Core.Platforms.Android.PlatformAndroid Error: 0 : [2018-03-19 11:18:18.1636] couldn't initialize Android platform: System.TypeInitializationException: The type initializer for 'Xamarin.AndroidTools.AndroidSdk' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.Android.Tools.AndroidSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' or one of its dependencies. The system cannot find the file specified.
at Xamarin.AndroidTools.AndroidSdk.Refresh(String androidSdkPath, String androidNdkPath, String javaSdkPath)
at Xamarin.AndroidTools.AndroidSdk..cctor()
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidSdk.get_AdbExe()
at XamarinProfiler.Core.Platforms.Android.PlatformAndroid..ctor()
XamarinProfiler.Core.Platforms.Android.PlatformAndroid Error: 0 : [2018-03-19 11:18:18.1636] couldn't initialize Android platform: System.TypeInitializationException: The type initializer for 'Xamarin.AndroidTools.AndroidSdk' threw an exception. ---> System.IO.FileNotFoundException: Could not load file or assembly 'Xamarin.Android.Tools.AndroidSdk, Version=1.0.0.0, Culture=neutral, PublicKeyToken=84e04ff9cfb79065' or one of its dependencies. The system cannot find the file specified.
at Xamarin.AndroidTools.AndroidSdk.Refresh(String androidSdkPath, String androidNdkPath, String javaSdkPath)
at Xamarin.AndroidTools.AndroidSdk..cctor()
--- End of inner exception stack trace ---
at Xamarin.AndroidTools.AndroidSdk.get_AdbExe()
at XamarinProfiler.Core.Platforms.Android.PlatformAndroid..ctor()
XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:18.1646] initializing android platform
XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:18.1646] initializing ios platform
XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:18.1646] initializing mlpd platform
XamarinProfiler.Core.Profiler Information: 0 : [2018-03-19 11:18:18.2009] processing command line = C:\Program Files (x86)\Xamarin\Profiler\XamarinProfiler.exe --type=android --target=com.companyname.App7|md575e49c7aa4366f9abf2b4ae29d2f5116.MainActivity --device=21bc93f1 --options=name:Samsung SM-G900V
XamarinProfiler.Windows.Core.WindowsRunFactory Information: 0 : [2018-03-19 11:18:25.2903] Creating android run for com.companyname.App7|md575e49c7aa4366f9abf2b4ae29d2f5116.MainActivity target on device 21bc93f1
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2018-03-19 11:18:25.3113] Initializing profiling...
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2018-03-19 11:18:25.3509] Waiting for device 21bc93f1 to connect
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2018-03-19 11:18:25.3529] Sorry, something went wrong trying to run com.companyname.App7: Device 21bc93f1 not found
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Error: 0 : [2018-03-19 11:18:25.3529] Sorry, something went wrong trying to run com.companyname.App7: Device 21bc93f1 not found
XamarinProfiler.Windows.ViewModels.ProgressReport.ReportViewModel Information: 0 : [2018-03-19 11:18:25.3529] Sorry, something went wrong trying to run com.companyname.App7: Device 21bc93f1 not found
XamarinProfiler.Windows.MainWindow Error: 0 : [2018-03-19 11:18:25.3549] Error occured on run com.companyname.App7: Device 21bc93f1 not found
XamarinProfiler.Windows.MainWindow Error: 0 : [2018-03-19 11:18:25.3549] Error occured on run com.companyname.App7: Device 21bc93f1 not found
XamarinProfiler.Windows.MainWindow Information: 0 : [2018-03-19 11:18:25.3559] StartRecording for com.companyname.App7

From the error it appears that it is not able to create Xamarin.Android.Tools.AndroidSDK but can't figure out why would that be. Maybe it is looking for the tool at a location where the tool is not installed? But where is it looking?

I confirmed that I have the SDK and tools installed under C:\Program Files (x86)\Android\android-sdk

Please help, at this time I have lost all my hope!

Thanks.

Answers

  • RodrigoMoyaRodrigoMoya ESXamarin Team Xamurai

    Where did you get the sim images from? The new Xamarin SDK manager needs new images, as the old (google) ones are not compatible, so make sure you create a new image from the Xamarin device manager, which would use the correct images.

    I've seen other users being hit by this, and this fixed it for them, so let me know if it doesn't.

  • kakeskakes USMember ✭✭

    @RodrigoMoya
    Thanks for your reply. Yes, I did read this on the other posts after which I created the sim image using the Xamarin Device Manager and these images are brand new images but I still get the same error.

  • RodrigoMoyaRodrigoMoya ESXamarin Team Xamurai

    @NinaVyedin any idea?

Sign In or Register to comment.