question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

.Net MAUI 7 Android, Image Gif Animation Not Playing in Release Mode, Normal in Debug Mode

See original GitHub issue

Description

I tried to release the .net maui apps that I made, when in debug mode everything works fine, but the problem occurs when I release my application to Android, the gif image that I use for loading doesn’t work properly, no animation is playing, it only displays the native image.

Then I tried to make a simple application to confirm this problem, and yes, the problem remains the same, here I attach the simple code that I made, where this coding runs normally in debug mode, but in release mode the gif animation doesn’t play

Steps to Reproduce

The simple code

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MiCetApp.View.StartPage"
             Title="StartPage"
             BackgroundColor="#6789ba"
             Shell.NavBarIsVisible="False">
    <Grid
        RowDefinitions="*, Auto, Auto">
        <Image
            HeightRequest="150"
            Source="{Binding StringFormat=Resources/Images/loading_animation}"
            IsAnimationPlaying="False"
            x:Name="gifAnimation"/>

        <Button
            Grid.Row="1"
            Text="Play Animation"
            Clicked="PlayAnimation"/>

        <Button
            Grid.Row="2"
            Text="Pause Animation"
            Clicked="PauseAnimation"/>
    </Grid>
</ContentPage>


private void PlayAnimation(object sender, EventArgs e)
    {
        gifAnimation.IsAnimationPlaying = true;
    }

    private void PauseAnimation(object sender, EventArgs e)
    {
        gifAnimation.IsAnimationPlaying = false;
    }

Version with bug

6.0.312

Last version that worked well

6.0.312

Affected platforms

Android, I was not able test on other platforms

Affected platform versions

Android 11.0 API 31.0

Did you find any workaround?

No response

Relevant log output

No response

Issue Analytics

  • State:open
  • Created 8 months ago
  • Reactions:2
  • Comments:19

github_iconTop GitHub Comments

3reactions
ecosiminicommented, Jun 20, 2023

Been watching this one since March hoping it would get fixed before my app release but doesn’t look like it’s been started yet. I know you guys have your hands full with others issues but this does seem like basic functionality that should get fixed. Any update on when a fix for this might go out? Thank you MAUI team.

2reactions
rfangzhcommented, Mar 23, 2023

Is there any workaround to this issue, please?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Gif can display animation on android when release
When debug it work well , then release it dose not work? ... Net MAUI 7 Android, Image Gif Animation Not Playing in...
Read more >
NET MAUI Animation doesn't work on Android platform
The remaining Android problem is Animated gifs do not start initially #7019, and that affects only the initial startup. Until that is fixed...
Read more >
MAUI app not working in release mode but it ...
My MAUI App when running in Debug mode in a emulator is working good but it is not running when I run this...
Read more >
NET MAUI Debug Build works fine but Release Build fails
I'm trying to publish my MAUI project in release mode for iOS and Android and right now in Debug mode I can get...
Read more >
Use .NET MAUI for Native, No-Compromise Apps
In .NET MAUI, we decided it didn't need to be so complicated to build cross-platform apps that remain native, so we've abstracted away...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found