-
-
Notifications
You must be signed in to change notification settings - Fork 206
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAUI Sample Android - allow for Debug on physical devices #3748
base: main
Are you sure you want to change the base?
Conversation
@@ -7,6 +7,7 @@ | |||
On Windows, we'll also build for Windows 10. | |||
--> | |||
<TargetFrameworks>net8.0-android</TargetFrameworks> | |||
<RuntimeIdentifiers Condition="$(TargetFramework.Contains('-android'))">android-arm;android-arm64;android-x86;android-x64</RuntimeIdentifiers> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't that what this group of properties is doing?
sentry-dotnet/samples/Sentry.Samples.Maui/Sentry.Samples.Maui.csproj
Lines 65 to 72 in ed63749
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'android' And '$(OSArchitecture)' == 'Arm64'">android-arm64</RuntimeIdentifier> | |
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(_IsPublishing)' == 'true'">ios-arm64</RuntimeIdentifier> | |
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'Arm64' And '$(_IsPublishing)' != 'true'">iossimulator-arm64</RuntimeIdentifier> | |
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'Arm64'">maccatalyst-arm64</RuntimeIdentifier> | |
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'android' And '$(OSArchitecture)' == 'x64'">android-x64</RuntimeIdentifier> | |
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'ios' And '$(OSArchitecture)' == 'x64' And '$(_IsPublishing)' != 'true'">iossimulator-x64</RuntimeIdentifier> | |
<RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'maccatalyst' And '$(OSArchitecture)' == 'x64'">maccatalyst-x64</RuntimeIdentifier> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, my bad I didn't notice the line <RuntimeIdentifier Condition="'$(TargetPlatformIdentifier)' == 'android' And '$(OSArchitecture)' == 'Arm64'">android-arm64</RuntimeIdentifier>
for some reasons
However it doesn't work at all on my side
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not on windows at least
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any context? Like error messages etc.?
Might also be worth trying with the version-5.0.0 branch since there are quite a few changes (to support net9.0) in that branch.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any context? Like error messages etc.?
I'm getting ADB0020: Mono.AndroidTools.IncompatibleCpuAbiException: The package does not support the CPU architecture of this device.
Might also be worth trying with the version-5.0.0 branch since there are quite a few changes (#3699) in that branch.
I'm gonna try that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only difference between what you're trying to do in this PR and what already happens in the Samples project is you're adding android-arm
and android-x86
... so possibly just need to tweak the existing code block to cater to whichever of those allows you to run the sample of the particular physical you're trying to deploy to.
Would be good to keep this in the same styles as all the others.
Added Android runtime identifiers in the Maui Sample config to allow debugging from a physical Android device.
When debugging, it's often more handy to use a physical device over an emulator. Until now, it was only possible to do it with an iOS device.
It's only logical to add this for Android as well.
#skip-changelog