Skip to content

android application with testOnly option set to true can't be deployed #11345

@prostopsih

Description

@prostopsih

Description

This is error that I get:
ADB0010: Mono.AndroidTools.InstallFailedException: Failure [INSTALL_FAILED_TEST_ONLY: installPackageLI]...

https://stackoverflow.com/questions/62162640/xamarin-android-install-flags
There is same problem with xamarin.forms

Steps to Reproduce

  1. Create new dotnet maui application
  2. Set android:testOnly="true" property on application tag in android manifest
  3. Try to debug application

Link to public reproduction project repository

https://github.com/prostopsih/Android-TestOnly-Bug-Repro

Version with bug

7.0 (current)

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 9, 12, 13

Did you find any workaround?

deploy manually using following command:
adb install -t {apkFilePath}

The problem is that I can't debug my application after installing it in such way.

In android studio testOnly is set to true by default and also there is a possibility to add extra parameters on install command.

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-toolingXAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debuggingpartner/androidIssues for the Android SDKplatform/androidt/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions