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.

Couldn't get it to work on Android with Xamarin Forms

See original GitHub issue

🐛 Bug Report

I’ve created a new Xamarin Forms project from Scratch, using latest Xamarin Forms 3.4 and .net standard 2.0.3. Animation works fine on iOS, but is not shown on Android. Might be related to #202 but I don’t have problems with iOS. I’ve attached a sample app: LottieTest.zip

Expected behavior

Animation should be shown on Android

Reproduction steps

  1. Create new Xamarin Forms Project
  2. Add Lottie to project
  3. Add “LottieLogo1.json” to “Assets”-Folder in Android and “Resources” Folder on iOS.
  4. Update Mainpage.xaml:
<?xml version="1.0" encoding="UTF-8"?>
<ContentPage 
    xmlns="http://xamarin.com/schemas/2014/forms" 
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" 
    xmlns:lottie="clr-namespace:Lottie.Forms;assembly=Lottie.Forms"
    x:Class="LottieTest.MainPage2">
    <ContentPage.Content>
        <StackLayout BackgroundColor="White">
            <lottie:AnimationView 
                x:Name="animationView" 
                Animation="LottieLogo1.json" 
                Loop="true"
                AutoPlay="true"
                VerticalOptions="FillAndExpand" 
                HorizontalOptions="FillAndExpand" />
        </StackLayout>
    </ContentPage.Content>
</ContentPage>

I’ve also tried ImageAssetsFolder="Assets" for testing but no changes.

Configuration

Version: 2.7.0

Platform:

  • 🤖 Android
  • 🐒 Xamarin.Forms

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:8 (1 by maintainers)

github_iconTop GitHub Comments

2reactions
finebytescommented, Jun 25, 2020

If it helps anybody, I managed to get it working by setting the Target Android Version to 10.0 image

Just make sure you clean build it, uninstall it from the device and publish it fresh if it doesn’t work the first time.

1reaction
martijn00commented, Jun 18, 2020

@Calinciurariu hateful comments that don’t add value to the conversation should be closed. Just as your comment “instead of coming with a fix” is very insulting. Why don’t you open a PR yourself? Why don’t you pay to fix it?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Xamarin Forms 5 compiling to android not working
This answer addresses a compile error, yet the question states it compiles fine, but doesn't deploy properly. I am experiencing what is ...
Read more >
Couldn't get it to work on Android with Xamarin Forms #204
I've created a new Xamarin Forms project from Scratch, using latest Xamarin Forms 3.4 and .net standard 2.0.3. Animation works fine on iOS,...
Read more >
Android Emulator Troubleshooting - Xamarin
This article explains how to diagnose and work around problems that may occur when using the Android Emulator.
Read more >
Why am I getting this error on a new Xamarin Forms ...
IO.DirectoryNotFoundException: Could not find a part of the path 'AccessibilityManagerCompat_AccessibilityStateChangeListenerImplementor.class'.
Read more >
Can't build Xamarin for Android Project
I was able to get around the problem by converting our Xamarin iOS application over from packages.config to PackageReferences directly in the ...
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