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
- Create new Xamarin Forms Project
- Add Lottie to project
- Add āLottieLogo1.jsonā to āAssetsā-Folder in Android and āResourcesā Folder on iOS.
- 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:
- Created 5 years ago
- Comments:8 (1 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
If it helps anybody, I managed to get it working by setting the Target Android Version to 10.0
Just make sure you clean build it, uninstall it from the device and publish it fresh if it doesnāt work the first time.
@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?