Xamarin-android: Running Android App to AVD fails with "error ADB0000: Value cannot be null" using XA 9.1.0.12

Created on 22 Aug 2018  路  6Comments  路  Source: xamarin/xamarin-android

Steps to Reproduce

  1. Create an Android App using VSMac
  2. Select Android_Accelerated_Nougat (API 25) AVD
  3. Build and Deploy the project

Repro Bundle

Expected Behavior

The project is deployed successfully

Actual Behavior

The project fails to deploy to AVD with error

error ADB0000: Value cannot be null.
error ADB0000: Parameter name: path2
error ADB0000:   at System.IO.Path.Combine (System.String path1, System.String path2, System.String path3) [0x0002a] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-06/external/bockbuild/builds/mono-x64/mcs/class/corlib/System.IO/Path.cs:849 
error ADB0000:   at Xamarin.AndroidTools.PlatformPackage.GetVersionInfo (System.String frameworkVersion) [0x0000a] in :0 
error ADB0000:   at Xamarin.AndroidTools.PlatformPackage.GetPlatformPackageVersion (System.Int32 apiLevel, System.String& packageName) [0x00040] in :0 
error ADB0000:   at AndroidDeviceExtensions.GetPackageVersionsAsync (Mono.AndroidTools.AndroidDevice device, System.Int32 packageApiLevel, System.String packageName, System.Threading.CancellationToken cancellationToken) [0x0001f] in :0 
error ADB0000:   at AndroidDeviceExtensions.GetPackagesAsync (Mono.AndroidTools.AndroidDevice device, System.Int32 packageApiLevel, System.String packageName, System.Boolean provideFullDebugRuntime, System.Threading.CancellationToken cancellationToken, Xamarin.AndroidTools.IProgressNotifier progressReporter) [0x001cc] in :0 
error ADB0000:   at Xamarin.AndroidTools.AndroidDeploySession.RunAsync (System.Threading.CancellationToken token) [0x001c4] in :0 
error ADB0000:   at Xamarin.AndroidTools.AndroidDeploySession.RunLoggedAsync (System.Threading.CancellationToken token) [0x00077] in :0 

Full Deploying To Device pad content of VS for Mac

Version Information

About VS for Mac

Version: 9.1.0.12 (Visual Studio Enterprise)
Android SDK: /Users/builder/Library/Developer/Xamarin/android-sdk-macosx
    Supported Android versions:
        2.3    (API level 10)
        4.0.3  (API level 15)
        4.1    (API level 16)
        4.2    (API level 17)
        4.3    (API level 18)
        4.4    (API level 19)
        4.4.87 (API level 20)
        5.0    (API level 21)
        5.1    (API level 22)
        6.0    (API level 23)
        7.0    (API level 24)
        7.1    (API level 25)
        8.0    (API level 26)
        8.1    (API level 27)

SDK Tools Version: 26.1.1
SDK Platform Tools Version: 27.0.1
SDK Build Tools Version: 27.0.2

Java SDK: /usr
java version "1.8.0_144"
Java(TM) SE Runtime Environment (build 1.8.0_144-b01)
Java HotSpot(TM) 64-Bit Server VM (build 25.144-b01, mixed mode)

Log File

All 6 comments

Thanks @dbatemanstl for such a useless help.

Currently I have the same problem in arround 90% of my build/deploy actions.
and guess what ADB is installed.

Are you folks seeing this on past versions of Xamarin.Android?

Other than the Xamarin.Android 9.1 preview?

Same happening randomly with Xamarin.Android

Microsoft Visual Studio Enterprise 2017
Version 15.8.5
VisualStudio.15.Release/15.8.5+28010.2036
Microsoft .NET Framework
Version 4.7.03056

Installed Version: Enterprise

Visual C++ 2017 00369-60000-00001-AA049
Microsoft Visual C++ 2017

Application Insights Tools for Visual Studio Package 8.13.10627.1
Application Insights Tools for Visual Studio

ASP.NET and Web Tools 2017 15.8.05085.0
ASP.NET and Web Tools 2017

ASP.NET Core Razor Language Services 15.8.31590
Provides languages services for ASP.NET Core Razor.

ASP.NET Web Frameworks and Tools 2017 5.2.60618.0
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0 15.8.05023.0
Azure App Service Tools v3.0.0

Azure Data Lake Node 1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio 2.3.3000.2
Microsoft Azure Data Lake Tools for Visual Studio

Azure Stream Analytics Tools for Visual Studio 2.3.3000.2
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools 2.9.0-beta8-63208-01
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools 1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Extensibility Message Bus 1.1.49 (remotes/origin/d15-8@ee674f3)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

JavaScript Language Service 2.0
JavaScript Language Service

JavaScript Project System 2.0
JavaScript Project System

Microsoft Azure HDInsight Azure Node 2.3.3000.2
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service 2.3.3000.2
Language service for Hive query

Microsoft Azure Stream Analytics Language Service 2.3.3000.2
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node 1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools 2.9
Microsoft Azure Tools for Microsoft Visual Studio 2017 - v2.9.10730.2

Microsoft Continuous Delivery Tools for Visual Studio 0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger 1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager 1.0
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger 1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual C++ Wizards 1.0
Microsoft Visual C++ Wizards

Microsoft Visual Studio Tools for Containers 1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Microsoft Visual Studio VC Package 1.0
Microsoft Visual Studio VC Package

MLGen Package Extension 1.0
MLGen Package Visual Studio Extension Detailed Info

Mono Debugging for Visual Studio 4.11.11-pre (8fb558f)
Support for debugging Mono processes with Visual Studio.

NuGet Package Manager 4.6.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit http://docs.nuget.org/.

ProjectServicesPackage Extension 1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Redgate ReadyRoll 1.17.18155.10346
Extend DevOps processes to your SQL Server databases and safely automate database deployments.

Visit https://www.red-gate.com/readyroll for more information.

Copyright (C) 2011 Red Gate Software Ltd. All rights reserved.

This software contains components from Component Owl.
SQL Server is a registered trademark of Microsoft Corporation.
Visual Studio is a registered trademark of Microsoft Corporation.

ReadyRoll contains code from the following open source software:

NuGet https://www.nuget.org/
SQL LocalDB Wrapper https://github.com/martincostello/sqllocaldb
Autofac https://autofac.org/
Json.NET https://json.net/
MahApps.Metro http://mahapps.com/
SemVer https://github.com/maxhauser/semver
Log4Net http://logging.apache.org/log4net/
StringTemplate https://github.com/antlr/stringtemplate4
Extended WPF Toolkit https://wpftoolkit.codeplex.com/
Code InfoBox VSX http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX
OctoPack https://github.com/OctopusDeploy/OctoPack
SQLite https://sqlite.org/

This product contains icons from http://www.visualpharm.com distributed under a free backlink license.

For license details or other notices relating to the above software, please see NOTICE.TXT and EULA.rtf in the ReadyRoll application folder.

Redgate SQL Prompt 9.2.0.5601
Write, format, and refactor SQL effortlessly

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

ResourcePackage Extension 1.0
ResourcePackage Visual Studio Extension Detailed Info

Snapshot Debugging Extension 1.0
Snapshot Debugging Visual Studio Extension Detailed Info

SQL Server Data Tools 15.1.61808.07020
Microsoft SQL Server Data Tools

ToolWindowHostedEditor 1.0
Hosting json editor into a tool window

TypeScript Tools 15.8.20822.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools 2.9.0-beta8-63208-01
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.2 for F# 4.5 15.8.0.0. Commit Hash: 55a3dc3231c95c77f81ee53f7d29152029da7408.
Microsoft Visual F# Tools 10.2 for F# 4.5

Visual Studio Code Debug Adapter Host Package 1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Tools for Containers 1.0
Visual Studio Tools for Containers

Visual Studio Tools for Universal Windows Apps 15.0.28010.00
The Visual Studio Tools for Universal Windows apps allow you to build a single universal app experience that can reach every device running Windows 10: phone, tablet, PC, and more. It includes the Microsoft Windows 10 Software Development Kit.

VisualStudio.Mac 1.0
Mac Extension for Visual Studio

Xamarin 4.11.0.776 (d15-8@1ae9b59d7)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer 4.15.9 (d000f568b)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates 1.1.116 (9619170)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK 9.0.0.19 (HEAD/a8a3b0ec7)
Xamarin.Android Reference Assemblies and MSBuild support.

Xamarin.iOS and Xamarin.Mac SDK 12.0.0.15 (84552a4)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.

@pallavbohara this is actually fixed in the 15.9 preview, sorry it is not fixed in 15.8.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

mathiasnielsen picture mathiasnielsen  路  4Comments

KSemenenko picture KSemenenko  路  3Comments

jonpryor picture jonpryor  路  3Comments

sdebruyn picture sdebruyn  路  3Comments

EmilAlipiev picture EmilAlipiev  路  3Comments