How to fix the package name of xamarin android binding?

打玻璃 1,546 Reputation points
2021-04-19T00:41:58.957+00:00

The package name is com.xxx.A.2ND

it is number first

I know how to fix the method name with the number first

<attr path="/api/package[@name='com.someapp.android.mpa.guidance']/
    interface[@name='NavigationManager.Listener']/
    method[@name='on2DSignNextManeuver']" 
    name="argsType">NavigationManager.TwoDSignNextManueverEventArgs</attr>

but it is the package name how to fix it?

Xamarin
Xamarin
A Microsoft open-source app platform for building Android and iOS apps with .NET and C#.
4,824 questions
{count} votes

Accepted answer
  1. Leon Lu (Shanghai Wicresoft Co,.Ltd.) 41,831 Reputation points Microsoft Employee
    2021-04-22T02:13:31.92+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    You can try to add following <attr> tag in the metadata.xml

       <attr path="/api/package[@name='com.xxx.A.2ND']" name="managedName">com.xxx.A.SecondND</attr>  
    

    You can refer to this document about changing the name of a package, class, method, or parameter : https://learn.microsoft.com/en-us/xamarin/android/platform/binding-java-library/customizing-bindings/java-bindings-metadata#managedname

    Best Regards,

    Leon Lu


    If the response is helpful, please click "Accept Answer" and upvote it.

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    No comments

0 additional answers

Sort by: Most helpful