Baseflow / ExoPlayerXamarin

Xamarin bindings library for the Google ExoPlayer library

Home Page:https://baseflow.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Abstract method error when trying to call some methods/properties on SimpleExoPlayer instance

jpiechowiak opened this issue · comments

💬 Questions and Help

Hi,
I've tried to use the newest version 2.11.4.
My sample project is using AndroidX and I've turned on r8 and d8.

<AndroidDexTool>d8</AndroidDexTool>
<AndroidLinkTool>r8</AndroidLinkTool>
<AndroidEnableMultiDex>false</AndroidEnableMultiDex>

Project compiles without any errors, but when I try to do something SimpleExoPlayer class instance,
for instance set up property PlayWhenReady
then I'm receiving an error:

Java.Lang.AbstractMethodError: 'abstract method "void com.google.android.exoplayer2.Player$EventListener.onPlayerStateChanged(boolean, int)"'

I know that earlier such issues were connected with r8 and d8.

Is there any additional configuration necessary?

Here are all installed packages:

<PackageReference Include="Newtonsoft.Json">
    <Version>12.0.3</Version>
</PackageReference>
<PackageReference Include="System.Net.Http">
    <Version>4.3.4</Version>
</PackageReference>
<PackageReference Include="Xam.Plugins.Android.ExoPlayer">
    <Version>2.11.4</Version>
</PackageReference>
<PackageReference Include="Xamarin.Android.Glide">
    <Version>4.9.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.V4">
    <Version>1.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Lifecycle.LiveData">
    <Version>2.2.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.VectorDrawable.Animated">
    <Version>1.1.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Legacy.Support.Core.Utils" Version="1.0.0" />
<PackageReference Include="Xamarin.AndroidX.Browser" Version="1.2.0" />
<PackageReference Include="Xamarin.AndroidX.Fragment">
    <Version>1.2.3</Version>
</PackageReference>
<PackageReference Include="Xamarin.AndroidX.Leanback">
    <Version>1.0.0</Version>
</PackageReference>
<PackageReference Include="Xamarin.Essentials" Version="1.5.2" />
<PackageReference Include="Xamarin.AndroidX.Migration" Version="1.0.3" />

Below is my system info from Visual Studio:

Microsoft Visual Studio Community 2019
Version 16.5.2
VisualStudio.16.Release/16.5.2+29926.136
Microsoft .NET Framework
Version 4.8.03752

Installed Version: Community

ADL Tools Service Provider   1.0
This package contains services used by Data Lake tools

ASA Service Provider   1.0

ASP.NET and Web Tools 2019   16.5.236.49856
ASP.NET and Web Tools 2019

ASP.NET Web Frameworks and Tools 2019   16.5.236.49856
For additional information, visit https://www.asp.net/

Azure App Service Tools v3.0.0   16.5.236.49856
Azure App Service Tools v3.0.0

Azure Data Lake Node   1.0
This package contains the Data Lake integration nodes for Server Explorer.

Azure Data Lake Tools for Visual Studio   2.4.5000.0
Microsoft Azure Data Lake Tools for Visual Studio

Azure Functions and Web Jobs Tools   16.5.236.49856
Azure Functions and Web Jobs Tools

Azure Stream Analytics Tools for Visual Studio   2.4.5000.0
Microsoft Azure Stream Analytics Tools for Visual Studio

C# Tools   3.5.0-beta4-20153-05+20b9af913f1b8ce0a62f72bea9e75e4aa3cf6b0e
C# components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Common Azure Tools   1.10
Provides common services for use by Azure Mobile Services and Microsoft Azure Tools.

Cookiecutter   16.5.20041.1
Provides tools for finding, instantiating and customizing templates in cookiecutter format.

Extensibility Message Bus   1.2.0 (d16-2@8b56e20)
Provides common messaging-based MEF services for loosely coupled Visual Studio extension components communication and integration.

IntelliCode Extension   1.0
IntelliCode Visual Studio Extension Detailed Info

Microsoft Azure HDInsight Azure Node   2.4.5000.0
HDInsight Node under Azure Node

Microsoft Azure Hive Query Language Service   2.4.5000.0
Language service for Hive query

Microsoft Azure Stream Analytics Language Service   2.4.5000.0
Language service for Azure Stream Analytics

Microsoft Azure Stream Analytics Node   1.0
Azure Stream Analytics Node under Azure Node

Microsoft Azure Tools   2.9
Microsoft Azure Tools for Microsoft Visual Studio 2019 - v2.9.30207.1

Microsoft Continuous Delivery Tools for Visual Studio   0.4
Simplifying the configuration of Azure DevOps pipelines from within the Visual Studio IDE.

Microsoft JVM Debugger   1.0
Provides support for connecting the Visual Studio debugger to JDWP compatible Java Virtual Machines

Microsoft Library Manager   2.1.25+gdacdb9b7a1
Install client-side libraries easily to any web project

Microsoft MI-Based Debugger   1.0
Provides support for connecting Visual Studio to MI compatible debuggers

Microsoft Visual Studio Tools for Containers   1.1
Develop, run, validate your ASP.NET Core applications in the target environment. F5 your application directly into a container with debugging, or CTRL + F5 to edit & refresh your app without having to rebuild the container.

Mono Debugging for Visual Studio   16.5.514 (c4f36a9)
Support for debugging Mono processes with Visual Studio.

Node.js Tools   1.5.20122.1 Commit Hash:d74ac73e6e22f9e009948cab4535a26194b19b1b
Adds support for developing and debugging Node.js apps in Visual Studio

NuGet Package Manager   5.5.0
NuGet Package Manager in Visual Studio. For more information about NuGet, visit https://docs.nuget.org/

ProjectServicesPackage Extension   1.0
ProjectServicesPackage Visual Studio Extension Detailed Info

Python   16.5.20041.1
Provides IntelliSense, projects, templates, debugging, interactive windows, and other support for Python developers.

Python - Conda support   16.5.20041.1
Conda support for Python projects.

Python - Django support   16.5.20041.1
Provides templates and integration for the Django web framework.

Python - IronPython support   16.5.20041.1
Provides templates and integration for IronPython-based projects.

Python - Profiling support   16.5.20041.1
Profiling support for Python projects.

SQL Server Data Tools   16.0.62003.05170
Microsoft SQL Server Data Tools

ToolWindowHostedEditor   1.0
Hosting json editor into a tool window

TypeScript Tools   16.0.20225.2001
TypeScript Tools for Microsoft Visual Studio

Visual Basic Tools   3.5.0-beta4-20153-05+20b9af913f1b8ce0a62f72bea9e75e4aa3cf6b0e
Visual Basic components used in the IDE. Depending on your project type and settings, a different version of the compiler may be used.

Visual F# Tools 10.8.0.0 for F# 4.7   16.5.0-beta.20104.8+7c4de19faf36647c1ef700e655a52350840c6f03
Microsoft Visual F# Tools 10.8.0.0 for F# 4.7

Visual Studio Code Debug Adapter Host Package   1.0
Interop layer for hosting Visual Studio Code debug adapters in Visual Studio

Visual Studio Container Tools Extensions (Preview)   1.0
View, manage, and diagnose containers within Visual Studio.

Visual Studio Tools for Containers   1.0
Visual Studio Tools for Containers

VisualStudio.DeviceLog   1.0
Information about my package

VisualStudio.Foo   1.0
Information about my package

VisualStudio.Mac   1.0
Mac Extension for Visual Studio

Xamarin   16.5.000.528 (d16-5@2b54082)
Visual Studio extension to enable development for Xamarin.iOS and Xamarin.Android.

Xamarin Designer   16.5.0.470 (remotes/origin/d16-5@681de3fd6)
Visual Studio extension to enable Xamarin Designer tools in Visual Studio.

Xamarin Templates   16.5.49 (0904f41)
Templates for building iOS, Android, and Windows apps with Xamarin and Xamarin.Forms.

Xamarin.Android SDK   10.2.0.100 (d16-5/988c811)
Xamarin.Android Reference Assemblies and MSBuild support.
    Mono: c0c5c78
    Java.Interop: xamarin/java.interop/d16-5@fc18c54
    ProGuard: xamarin/proguard/master@905836d
    SQLite: xamarin/sqlite/3.28.0@46204c4
    Xamarin.Android Tools: xamarin/xamarin-android-tools/d16-5@9f4ed4b


Xamarin.iOS and Xamarin.Mac SDK   13.16.0.11 (aa73e41)
Xamarin.iOS and Xamarin.Mac Reference Assemblies and MSBuild support.
commented

Any updates on this? The workaround for native Android that uses Gradle is:

android.enableDexingArtifactTransform=false

What would be the equivalent for Visual Studio solution?

Please try again in 2.11.7

The SAme issue now happening on the last version 2.18.3

I try 2.16.1 in order to use Xamarin.Android and have the same issue.