Skip to content
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

Android App Fails in Release Build on Android 14 #19027

Closed
david-maw opened this issue Nov 25, 2023 · 3 comments
Closed

Android App Fails in Release Build on Android 14 #19027

david-maw opened this issue Nov 25, 2023 · 3 comments
Labels
platform/android 🤖 t/bug Something isn't working

Comments

@david-maw
Copy link

Description

I have an App migrated from Xamarin that works fine in debug builds on Android levels including 14. Release builds work on levels 13 and below but fail when run on Android 14. A workaround is to build targeting Android 13, which generates warnings but produces a file which will run on Android 14.

I don't know much about Android programming but looking at logcat for a failed run I see a stack dump for:
java.lang.SecurityException: com.autoplus.divisibill: One of RECEIVER_EXPORTED or RECEIVER_NOT_EXPORTED should be specified when a receiver isn't being registered exclusively for system broadcasts
Since it's not visible in the run that works this seems like some sort of tighter security requirement might be the problem. I've attached logs for a working and failing run.

failed.txt
worked.txt

I've no idea what make my app require this permission but the NuGet packages it uses are:

   <ItemGroup>
      <PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)" />
      <PackageReference Include="Microsoft.Maui.Controls.Compatibility" Version="$(MauiVersion)" />
      <PackageReference Include="Microsoft.Extensions.Logging.Debug" Version="8.0.0" />
      <PackageReference Include="CommunityToolkit.Common" Version="8.2.2" />
      <PackageReference Include="CommunityToolkit.Maui" Version="7.0.0" />
      <PackageReference Include="CommunityToolkit.Mvvm" Version="8.2.2" />
      <PackageReference Include="Microsoft.AppCenter.Analytics" Version="5.0.3" />
      <PackageReference Include="Microsoft.AppCenter.Crashes" Version="5.0.3" />
      <PackageReference Include="Plugin.InAppBilling" Version="7.1.0" />
      <PackageReference Include="SixLabors.ImageSharp" Version="3.0.2" />
      <PackageReference Include="SkiaSharp" Version="2.88.6" />
      <PackageReference Include="System.Text.Encodings.Web" Version="8.0.0" />
   </ItemGroup>

Steps to Reproduce

I cannot reproduce this in a simple test case

Link to public reproduction project repository

No response

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Android

Affected platform versions

Android 14

Did you find any workaround?

Yes, build the project targeting Android 13 - it will then run on Android 14. You'll have to change the target in the android manifest (see issue #19024)

Relevant log output

No response

@david-maw david-maw added the t/bug Something isn't working label Nov 25, 2023
@david-maw david-maw changed the title Android App Faile in Release Build for Android 14 Android App Fails in Release Build on Android 14 Nov 25, 2023
@drasticactions
Copy link
Contributor

drasticactions commented Nov 25, 2023

It's most likely this: #17861

Which is fixed in main and should appear in the next net8.0 Service Release.

e. And before you ask, I don't know when that is, if anyone on the MAUI team knows feel free to say.

@david-maw
Copy link
Author

Sure looks like it, Thanks.

@jfversluis
Copy link
Member

Duplicate of #17861

@jfversluis jfversluis marked this as a duplicate of #17861 Nov 27, 2023
@jfversluis jfversluis closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 28, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
platform/android 🤖 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants