question

Jay-0766 avatar image
0 Votes"
Jay-0766 asked JessieZhang-2116 commented

Upgrading to VS Mac 8.9.7 leads to error on AAR Bindings does not implement AsyncTask.DoInBackground(params Object[])

Hi,

I have a binding library and recently upgraded from vs mac 8.8.6 to vs mac 8.9.7. I am having an error with my binding library below and it is news to me.

 Error CS0534: 'classX' does not implement inherited abstract member 'AsyncTask.DoInBackground(params Object[]?)' (CS0534)

I also have this previously on my meta file

 <attr path="packageName" name="managedType">params Java.Lang.Object []</attr>

As where I've also checked the aar file I have.
Where my class that has trouble

 class classX extends AsyncTask<Void, Void, classA>
     classA doInBackground(Void... voids) {
         try {
               ... return classA
         } catch (Exception e) {
           return null;
         } 

I never encountered this issue before ever since the upgrade. Has anyone experienced this?

The only solution I've tried is to include the ff in the meta file:


  <add-node path="/api/package[@name='packageName']">
     <class abstract="false" deprecated="not deprecated" final="false" name="classX" visibility="public" extends="java.lang.Object">
     </class>
   </add-node>

And yes, it works but this will replace the current class to extend the java lang object and not async task [correct me if I'm wrong].
So I am wondering if are there any more refined fixes for this?

dotnet-xamarin
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @Jay-0766 ,what the managedTypeline is doing while the path is packageName?In addition , you can try to switch between class-parse and jar2xml option and try again.

0 Votes 0 ·

0 Answers