question

Grime avatar image
0 Votes"
Grime asked RobCaplan edited

I have a new Samsung Galaxy S20 FE that I want to deploy my app on, but I'm getting a Debuggable error

The error is:
Error XA0134: The application does not have the 'android:debuggable' attribute set in the AndroidManifest.xml.
This is required in order for Fast Deployment to work. This is normally enabled by default by the Xamarin.Android build system for Debug builds. Please check that you to not have this attribute set on the 'application' element in your 'AndroidManifest.xml'.
If you have a class that derives from 'Android.App.Application' and are using the '[Application]' make sure the 'Debuggable' property is not set at all as it will override the value for debug builds.

It is not clear how this can be overcome.
I have tried including "android:debuggable" within the application element within the Manifest (which the error says NOT to do, I know). The error persisted.
I have tried including the following in the AssemblyInfo.cs:

 #if DEBUG
 [Application(Debuggable = true)]
 #else
 [Application(Debuggable = false)]
 #endif

The error persisted.
As I mentioned, it is not clear how to fix this and answers to similar questions are years old.



dotnet-xamarin
· 4
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

@Grime Will the error be triggered on other Android phones or emulators? Confirm that the mode "Debug" is selected, rather than "Release". If the solution in Xamarin.Android error XA0134 doesn't work, please submit an issue on Github: xamarin/xamarin-android.

1 Vote 1 ·

I get exactly the same error using the Android Emulator Pixel 2 Pie 9.0 - API 28 (Android 9.0 - API 28).
I get a slightly different error using my physical Motorola Nexus 6 (Android 7.1 - API 25):
Severity Code Description Project File Line Suppression State
Error XA0137: The 'run-as' command failed with 'run-as: Package 'net.grime.apps.handsfreenotes' is not debuggable
'.
Fast Deployment is not currently supported on this device.
Please file an issue with the exact error message using the 'Help->Send Feedback->Report a Problem' menu item in Visual Studio or 'Help->Report a Problem' in Visual Studio for Mac.
Please set the 'EmbedAssembliesIntoApk' MSBuild property to 'true' to disable Fast Deployment in the Visual Studio project property pages, or edit the project file in a text editor. 0

To be clear, I obtained the Galaxy to do physical Android testing because the Nexus 6 was getting old.

VS2019 is running as Debug, not Release.

I have posted this on GitHub with the same question as per your request.

0 Votes 0 ·

@Grime This seems to be a VS issue, so try to reinstall the Xamarin component and also report a problem on Developer Community.

1 Vote 1 ·

BTW, the app works perfectly fine on my physical iPhone 11.

0 Votes 0 ·

1 Answer

Grime avatar image
1 Vote"
Grime answered

Thanks to @KyleWang-MSFT I found the solution on Github: xamarin/xamarin-android:
I had multiple application elements in my Android manifest. Once I limited them to one, the app compiled successfully on the Galaxy.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.