Xamarin Android binding YouTube video player compilation error
I want to bind YouTube androidplayerapi.jar to my xamarin Android project. I added YouTube androidplayerapi.jar under the jars folder, but my project cannot be compiled
Error: "do not overwrite object.finalize. Please use destructor."
Therefore, I try to change how it is compiled using the following methods:
<attr path="/api/package[@name='Com.Google.Android.Youtube.Player']/class[@name='YouTubeThumbnailView']/method[@name='Finalize']" name="managedName">~YouTubeThumbnailView</attr>
In the metadata.xml file under the transforms folder... It doesn't seem to be changed to a finalizer... I continue to use the syntax here in the hope that I can stumble upon some feasible methods
Is this the right way? Do I have any other better solutions I can do? I really want some feedback
thank you!
resolvent:
You should be able to delete it easily. However, the problem you encounter in < attr > is the fact that your package name / class name is incorrect, because it should follow the Java Convention (< lowercase package >. < propercase class >). Just make sure that the situation is as follows:
For example:
<remove-node path="/api/package[@name='com.google.android.youtube.player']/class[@name='YouTubeThumbnailView']/method[@name='finalize' and count(parameter)=0]" />